:root {
  color-scheme: light;
  --ink: #132024;
  --muted: #5c6870;
  --paper: #f6f2ea;
  --panel: #fffaf1;
  --line: #d8cbb9;
  --teal: #0f5c5f;
  --acorn-blue: #132f56;
  --teal-dark: #07373a;
  --amber: #d99a24;
  --red: #8e2f35;
  --green: #2f7a57;
  --shadow: 0 18px 44px rgba(19, 32, 36, 0.14);
}
.weather-cache-status,.weather-data-credit { display:block; font-size:11px; line-height:1.4; margin-top:6px; color:inherit; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--teal-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

.app-shell {
  min-height: 100vh;
}

.portal-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 15% 10%, rgba(217, 154, 36, 0.16), transparent 34%),
    var(--paper);
}

.login-hero-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-hero-image {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--teal-dark);
}

.login-hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 55, 58, 0.02), rgba(7, 55, 58, 0.68));
}

.login-hero-copy {
  position: absolute;
  left: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  bottom: clamp(24px, 4vw, 46px);
  z-index: 1;
  color: #fff;
}

.login-hero-copy h2 {
  max-width: 520px;
  margin: 0 0 16px;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.login-hero-copy p:last-child {
  margin: 0;
  font-size: 1rem;
}

.login-choice-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 64px);
}

.login-choice-panel h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1;
}

.login-choice-panel > p {
  margin: 0;
}

.login-route-grid {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.login-route-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dfcdb4;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.login-route-button {
  width: 100%;
  min-height: 0;
}

.login-route-button:hover,
.login-route-link:hover {
  border-color: var(--amber);
  background: #fffaf1;
  color: var(--ink);
}

.login-route-button span:last-child {
  display: grid;
  gap: 5px;
}

.login-route-button small {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.login-route-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef6f5;
  color: var(--teal);
  font-weight: 900;
}

.login-route-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.login-route-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.login-route-form {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.login-route-actions {
  display: flex;
  flex-wrap: wrap;
}

.login-help {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(255, 250, 241, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.top-login {
  width: min(440px, 44vw);
}

.top-login .login-panel {
  grid-template-columns: minmax(110px, 0.8fr) minmax(140px, 1fr) minmax(140px, 1fr);
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.top-login .login-panel h2,
.top-login .login-panel .session-line {
  grid-column: 1 / -1;
}

.top-login .button-row {
  align-items: end;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.brand-block p,
.brand-block h1,
.hero-copy h2,
.hero-copy p,
.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.brand-block p,
.eyebrow {
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-block h1 {
  font-size: 1.1rem;
}

.mode-switch,
.tabs,
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-button,
.tab,
.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.text-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 13px;
}

.mode-button span {
  width: 18px;
  overflow: hidden;
  color: var(--teal);
  font-size: 0;
}

.mode-button span::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.mode-button.active,
.tab.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.mode-button.active span {
  color: #fff;
}

.hero {
  position: relative;
  height: clamp(260px, 42vw, 430px);
  overflow: hidden;
  background: var(--teal-dark);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 32, 35, 0.82), rgba(7, 32, 35, 0.2) 54%, rgba(7, 32, 35, 0.75));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 5vw, 44px);
  color: #fff;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 4.9rem);
  line-height: 0.98;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 1px;
  min-width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.quick-stats div {
  display: grid;
  gap: 4px;
  min-height: 82px;
  align-content: center;
  padding: 12px;
}

.quick-stats strong {
  font-size: 1.65rem;
}

.quick-stats span {
  font-size: 0.78rem;
}

.volunteer-hours-stats {
  width: min(420px, 100%);
  min-width: 0;
  margin-bottom: 14px;
  border-color: #d9e0e4;
  background: #fff;
  backdrop-filter: none;
}

.split-flap-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(1440px, calc(100% - 32px));
  margin: 18px auto 20px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: #111816;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.split-flap-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 116px;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(180deg, #26322f 0%, #18211f 49%, #0d1413 50%, #1b2421 100%);
  color: #f8fbf7;
  text-align: center;
}

.split-flap-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.split-flap-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.11), transparent 42%);
}

.split-flap-card strong {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.split-flap-card span {
  position: relative;
  z-index: 1;
  color: #dbe7df;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .split-flap-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .split-flap-summary {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 420px);
  }

  .split-flap-card {
    min-height: 96px;
  }
}

.workspace {
  grid-template-columns: minmax(0, 1fr) !important;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 34px) 42px;
}

.side-panel,
.board-sidebar,
.main-panel,
.tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.board-sidebar {
  align-self: start;
  position: sticky;
  top: 112px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding: 16px;
}

.compact-heading {
  margin-bottom: 0;
}

.login-panel,
.tool-panel {
  display: grid;
  gap: 13px;
}

.login-panel h2,
.tool-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.session-line,
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

.main-panel {
  min-width: 0;
  padding: 18px;
}

.tabs {
  margin-bottom: 18px;
}

.tab {
  min-width: 108px;
  padding-inline: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel-heading h2 {
  margin-top: 5px;
  font-size: 1.55rem;
}

.rota-pager {
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.rota-pager button {
  min-height: 34px;
  padding: 5px 10px;
}

.rota-page-status {
  justify-self: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.event-calendar-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.event-calendar {
  display: grid;
  gap: 12px;
}

.calendar-month h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.calendar-event {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid #c8d2d3;
  background: #eef6f6;
  color: var(--ink);
  text-align: left;
}

.calendar-event:hover {
  background: #dceeee;
}

.calendar-event strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.9rem;
}

.calendar-event span {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.rota-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #bcc3c8;
  border-radius: 6px;
  background: #eef1f3;
}

.rota-event-header {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 8px 9px;
  border-bottom: 1px solid #aeb6bc;
  background: #d2d5d8;
}

.rota-event-header p,
.rota-event-header h3,
.rota-event-header span {
  margin: 0;
}

.rota-event-header p {
  font-size: 0.78rem;
}

.rota-event-header h3 {
  font-size: 0.96rem;
  line-height: 1.24;
}

.rota-event-header span {
  color: #354047;
  font-size: 0.76rem;
}

.rota-role-group {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
}

.rota-role-heading {
  margin: 0;
  padding: 4px 8px;
  border-radius: 3px;
  background: #686868;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.rota-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  margin: 0 3px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.rota-slot-filled {
  border-color: #a9c3d6;
  background: #cfe0ee;
}

.rota-slot-filled.mine {
  border-color: #4d8fbd;
  background: #bad8ed;
}

.rota-slot-open {
  border-color: #e0b8b8;
  background: #efd0d0;
}

.rota-slot div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rota-slot span,
.rota-slot small {
  overflow: hidden;
  color: #145b92;
  font-size: 0.76rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rota-slot span {
  color: #132024;
}

.rota-slot strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  line-height: 1.18;
}

.slot-action {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 4px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 0.78rem;
  box-shadow: 0 1px 0 rgba(19, 32, 36, 0.1);
}

.slot-action.secondary {
  color: #fff;
  background: var(--red);
}

.slot-action:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.tool-panel {
  box-shadow: none;
  padding: 16px;
}

.admin-side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.create-event-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.create-event-panel > button[type="submit"] {
  margin-top: auto;
}

.import-website-panel {
  align-self: start;
  gap: 8px;
  padding: 12px;
}

.import-website-panel h3 {
  font-size: 0.95rem;
}

.import-website-panel .hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.import-website-panel label,
.import-website-panel legend {
  font-size: 0.78rem;
}

.import-website-panel input,
.import-website-panel select,
.import-website-panel textarea {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.82rem;
}

.import-website-panel textarea {
  min-height: 70px;
  max-height: 110px;
}

.import-website-panel .role-checkboxes.compact {
  gap: 5px 8px;
}

.import-website-panel .role-checkboxes.compact label {
  gap: 6px;
  font-size: 0.76rem;
}

.import-website-panel .button-row {
  align-self: end;
  margin-top: auto;
}

.event-notes-field {
  min-height: 190px;
}

.wide-tool {
  grid-column: 1 / -1;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.profile-stat-list {
  display: grid;
  gap: 10px;
}

.profile-stat-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d9e0e4;
  border-radius: 6px;
  background: #fff;
}

.profile-stat-list strong {
  font-size: 1.2rem;
}

.profile-stat-list span {
  color: var(--muted);
  text-align: right;
}

.milestone-list {
  display: grid;
  gap: 10px;
}

.milestone-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 7px;
  background: #fff;
}

.milestone-list article.complete {
  border-left-color: var(--teal);
}

.milestone-list article.pending {
  opacity: 0.82;
}

.milestone-list strong {
  font-size: 0.9rem;
}

.milestone-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e0e4;
  border-radius: 7px;
  background: #fff;
}

.document-item h4,
.document-item p {
  margin: 0;
}

.document-item h4 {
  font-size: 0.95rem;
}

.document-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.board-form {
  margin-bottom: 14px;
}

.board-list {
  display: grid;
  gap: 12px;
}

.board-post {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  background: #fff;
}

.board-post header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.board-comment {
  display: grid;
  gap: 4px;
}

.board-comment span {
  color: var(--ink);
}

.board-comment strong {
  color: var(--muted);
}

.board-post header span {
  color: var(--muted);
}

.board-comments {
  display: grid;
  gap: 8px;
  padding-left: 12px;
  border-left: 3px solid #d9e0e4;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.email-list {
  display: grid;
  gap: 12px;
}

.event-email-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
  max-width: 620px;
  margin-top: 10px;
}

.event-email-actions select {
  min-width: 0;
}

.email-template-panel {
  margin-bottom: 14px;
}

.email-template-list {
  display: grid;
  border: 1px solid #d9e0e4;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.email-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 12px 16px;
  border-bottom: 1px solid #d9e0e4;
}

.email-template-row.open {
  background: #f9fbfc;
}

.email-template-row:last-child {
  border-bottom: 0;
}

.email-template-summary {
  display: grid;
  gap: 4px;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.email-template-summary:hover {
  background: transparent;
  color: var(--teal-dark);
}

.email-template-summary span {
  color: var(--ink);
  font-size: 0.96rem;
}

.email-template-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-template-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border-top: 1px solid #d9e0e4;
  padding-top: 12px;
}

.event-gap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.event-gap-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #c9d3d6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.event-gap-card.has-gaps {
  border-color: #e0b8b8;
  background: #fff7f7;
}

.event-gap-card.fully-covered {
  border-color: #b8d4c5;
}

.event-gap-card[data-management-event] {
  cursor: pointer;
}

.event-gap-card.selected-event {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 92, 95, 0.18), 0 10px 24px rgba(19, 32, 36, 0.12);
}

.selected-event-badge {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--teal);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.event-gap-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.event-gap-header p,
.event-gap-header h4,
.event-gap-header span,
.event-gap-card footer {
  margin: 0;
}

.event-gap-header p,
.event-gap-header span,
.event-gap-card footer {
  color: var(--muted);
  font-size: 0.78rem;
}

.event-gap-header-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.event-gap-header h4 {
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.2;
}

.event-gap-header strong {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--green);
  color: #fff;
  font-size: 0.78rem;
  white-space: nowrap;
}

.event-gap-card.has-gaps .event-gap-header strong {
  background: var(--red);
}

.ghost-mini {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal-dark);
}

.danger-mini {
  border: 1px solid #d8b5b8;
  background: #fff;
  color: var(--red);
}

.danger-mini:hover {
  background: var(--red);
  color: #fff;
}

.duplicate-event-form {
  display: grid;
  gap: 10px;
  border: 1px solid #c9d3d6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.duplicate-event-form h4 {
  margin: 0;
}

.event-gap-roles {
  display: grid;
  gap: 7px;
}


.shift-action-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.shift-action-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shift-action-status {
  display: flex;
  align-items: start;
  gap: 6px;
}

.event-gap-card {
  overflow: visible;
}

.event-gap-roles {
  overflow: visible;
}


.event-gap-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-radius: 6px;
  background: #edf6f1;
  padding: 9px;
}

.event-gap-role.needs-cover {
  background: #efd0d0;
}

.event-gap-role.partly-covered {
  background: #cfe3f3;
}

.event-gap-role.fully-covered {
  background: #d9eadf;
}

.event-gap-role.shift-action-card {
  cursor: pointer;
}

.event-gap-role.shift-action-card:hover,
.event-gap-role.shift-action-card:focus-visible,
.event-gap-role.selected-assignment-shift {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 10px 24px rgba(19, 32, 36, 0.12);
}

.event-gap-role div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.event-gap-role strong,
.event-gap-role span,
.event-gap-role small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-gap-role strong {
  font-size: 0.9rem;
}

.event-gap-role span,
.event-gap-role small {
  color: var(--muted);
  font-size: 0.78rem;
}

.event-gap-role b {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--green);
  font-size: 0.78rem;
  white-space: nowrap;
}

.manage-shift-label {
  border: 1px solid #c9d3d6;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.event-gap-role.needs-cover b {
  color: var(--red);
}

.event-gap-role.partly-covered b {
  color: #0b5c8a;
}

.event-gap-role.fully-covered b {
  color: var(--green);
}



.event-add-shift-panel {
  margin-top: 10px;
  border: 1px dashed #c9d3d6;
  border-radius: 8px;
  background: #fff;
}

.event-add-shift-panel summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.event-add-shift-panel summary::-webkit-details-marker {
  display: none;
}

.event-add-shift-panel[open] summary {
  border-bottom: 1px solid #d9e0e4;
  background: #f9fbfc;
}

.event-add-shift-form {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.event-add-shift-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.event-add-shift-grid label {
  min-width: 0;
}

.event-add-shift-grid select,
.event-add-shift-grid input {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.shift-assignment-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 25, 30, 0.22);
}

.shift-assignment-panel {
  width: min(430px, calc(100vw - 20px));
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -20px 0 40px rgba(19, 32, 36, 0.18);
  padding: 18px;
}

.shift-assignment-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.shift-assignment-panel h3,
.shift-assignment-panel h4 {
  margin: 0;
}

.assignment-event-summary,
.assignment-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.assignment-event-summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.assignment-event-summary b {
  width: fit-content;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--green);
  padding: 5px 9px;
  font-size: 0.78rem;
}

.assignment-search-label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.assignment-search {
  min-height: 42px;
}

.assigned-staff-list,
.assignment-candidate-list {
  display: grid;
  gap: 8px;
}

.assigned-staff-row,
.assignment-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e7ed;
  border-radius: 8px;
  background: #f7fbfc;
  padding: 10px;
}

.assigned-staff-row div,
.assignment-candidate-row div {
  display: grid;
  min-width: 0;
}

.assigned-staff-row span,
.assignment-candidate-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-candidate-row button {
  min-height: 36px;
  padding: 7px 12px;
}

.shift-details-form {
  display: grid;
  gap: 10px;
}

.shift-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shift-details-form label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.shift-details-form input,
.shift-details-form select,
.shift-details-form textarea {
  min-width: 0;
}

.assignment-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.assignment-action-row button {
  min-height: 36px;
}

.event-add-shift-form > button {
  width: 100%;
}


  .event-add-shift-form > button {
    justify-self: stretch;
  }
}


.event-gap-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 150px;
}

.event-gap-actions select {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.shift-time-editor {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.shift-time-editor select {
  width: 78px;
}

.staff-allocation-picker {
  display: grid;
  gap: 6px;
}

.staff-allocation-picker input,
.staff-allocation-picker select {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.mini-action {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
}

.staff-directory-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  align-content: start;
}

.admin-grid > .activity-report-panel {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.activity-report-panel.wide-tool {
  grid-column: 1 / -1;
  grid-row: auto;
}

.document-form-panel {
  grid-column: 2;
  grid-row: 1;
}

.documents-admin-panel {
  grid-column: 1 / -1;
}

.staff-list {
  display: grid;
  gap: 10px;
}

.activity-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-grid > .activity-report-panel .activity-controls .checkbox-label,
.admin-grid > .activity-report-panel .activity-controls button {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--ink);
}

.checkbox-label input {
  width: auto;
}

.activity-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.activity-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  border-bottom: 1px solid #d9e0e4;
  border-right: 1px solid #d9e0e4;
  padding: 13px 12px;
  text-align: left;
}

.activity-table th:last-child,
.activity-table td:last-child {
  border-right: 0;
}

.activity-table tr:last-child td {
  border-bottom: 0;
}

.activity-table th {
  background: #f9fbfc;
  font-weight: 800;
}


.staff-row-actions {
  display: grid;
  gap: 8px;
  align-self: end;
}

.staff-row-actions .mini-action,
.staff-row-actions .ghost-button {
  width: 100%;
}


.staff-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.15fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.staff-row h4,
.staff-row p {
  margin: 0;
}

.staff-row h4 {
  font-size: 0.98rem;
}

.staff-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.staff-contact-line strong {
  color: var(--ink);
}

.staff-kin-details {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
}

.staff-kin-details strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.staff-kin-details span {
  overflow-wrap: anywhere;
}

.staff-start-date {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.staff-start-date input {
  margin-top: 4px;
  min-height: 34px;
}

.role-checkboxes {
  display: grid;
  gap: 8px;
}

.role-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.role-checkboxes.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-checkboxes.compact legend {
  grid-column: 1 / -1;
}


.quick-shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.quick-shift-actions .ghost-mini {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}


.role-staffing {
  display: grid;
  gap: 9px;
}

.staffing-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 84px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.staffing-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.staffing-row input[type="number"] {
  min-width: 0;
  padding-inline: 8px;
  text-align: center;
}

.email-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 15px;
}

.email-item h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.email-item p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

@media (max-width: 1320px) {
  .shift-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .shift-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .activity-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .login-hero-panel {
    grid-template-columns: 1fr;
  }

  .login-hero-image {
    min-height: 360px;
  }

  .login-choice-panel {
    padding: 28px 18px;
  }

  .topbar,
  .topbar-actions,
  .hero-overlay,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .top-login {
    width: 100%;
  }

  .top-login .login-panel {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    justify-content: end;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .board-sidebar {
    position: static;
    max-height: none;
  }

  .shift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .staff-directory-panel,
  .activity-report-panel,
  .document-form-panel,
  .documents-admin-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 12px;
  }

  .mode-switch,
  .tabs,
  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .rota-pager {
    grid-template-columns: repeat(4, 1fr);
  }

  .rota-page-status {
    grid-column: 1 / -1;
  }

  .shift-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 520px;
  }

  .hero-copy h2 {
    font-size: 2.45rem;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .form-row,
  .claim-row,
  .staff-row,
  .staffing-row,
  .activity-controls {
    grid-template-columns: 1fr;
  }

  .staffing-row input[type="number"] {
    text-align: left;
  }
}


/* 2026-06 header and dashboard polish */
.topbar {
  gap: 22px;
  padding-block: 12px;
}

.topbar-actions {
  flex: 1;
}

.top-login {
  width: min(520px, 48vw);
}

.user-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: min(520px, 48vw);
  padding: 10px 12px;
  border: 1px solid rgba(15, 92, 95, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(19, 32, 36, 0.08);
}

.user-status p,
.user-status strong,
.user-status small {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status p {
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-status strong {
  color: var(--ink);
  font-size: 1rem;
}

.user-status small {
  color: var(--muted);
  font-size: 0.78rem;
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.signout-button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.hero {
  height: clamp(300px, 44vw, 500px);
}

.hero::after {
  background: linear-gradient(90deg, rgba(7, 32, 35, 0.86), rgba(7, 32, 35, 0.18) 55%, rgba(7, 32, 35, 0.68));
}

.quick-stats {
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(7, 32, 35, 0.2);
}

.main-panel,
.board-sidebar,
.tool-panel,
.event-calendar-panel,
.rota-column {
  border-radius: 14px;
}

.tabs {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tab {
  border-radius: 9px;
}

.shift-grid {
  gap: 10px;
}

.rota-column {
  box-shadow: 0 8px 20px rgba(19, 32, 36, 0.08);
}

.rota-event-header {
  background: linear-gradient(180deg, #e7e9eb, #d5d9dc);
}

.rota-role-heading {
  background: var(--teal-dark);
}

.rota-slot {
  margin-inline: 5px;
}

.rota-slot-open {
  border-color: #dfb0a8;
  background: #fae5e0;
}

.rota-slot-filled {
  border-color: #aac8d7;
  background: #d9eaf1;
}

.board-post,
.document-item,
.profile-stat-list article,
.email-item,
.event-gap-card,
.staff-row {
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(19, 32, 36, 0.05);
}

@media (max-width: 920px) {
  .top-login,
  .user-status {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .user-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .signout-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Monthly calendar tab */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-controls strong {
  min-width: 180px;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: center;
}

.monthly-calendar-panel {
  padding: 16px;
}

.month-calendar {
  display: grid;
  gap: 10px;
}

.month-calendar-weekdays,
.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.month-calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.month-calendar-day {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  background: #fff;
}

.month-calendar-day.empty {
  border-style: dashed;
  background: #f4efe7;
  opacity: 0.55;
}

.month-calendar-day.today {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 2px rgba(217, 154, 36, 0.22);
}

.month-calendar-day.has-events {
  background: #f9fbfc;
}

.month-calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.month-calendar-day header strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #eef6f6;
  color: var(--teal-dark);
}

.month-calendar-day.today header strong {
  background: var(--amber);
  color: #fff;
}

.month-calendar-day header span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.month-calendar-events {
  display: grid;
  gap: 6px;
}

.month-calendar-event {
  display: grid;
  gap: 2px;
  min-height: 0;
  padding: 7px 8px;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  text-align: left;
}

.month-calendar-event:hover {
  background: var(--teal-dark);
}


.month-calendar-event.needs-cover {
  background: var(--teal);
  border-left: 4px solid #b8d4c5;
}

.month-calendar-event.needs-cover:hover {
  background: var(--teal-dark);
}

.month-calendar-event.fully-covered {
  background: #6d7578;
  border-left: 4px solid #c8ced1;
}

.month-calendar-event.fully-covered:hover {
  background: #596164;
}

.month-calendar-event.needs-cover small,
.month-calendar-event.fully-covered small {
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.month-calendar-event span,
.month-calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-calendar-event span {
  font-size: 0.8rem;
  font-weight: 800;
}

.month-calendar-event small {
  font-size: 0.72rem;
  opacity: 0.82;
}

.calendar-empty-hint {
  margin-top: 6px;
}

@media (max-width: 920px) {
  .calendar-controls {
    justify-content: stretch;
  }

  .calendar-controls strong {
    order: -1;
    width: 100%;
    min-width: 0;
  }

  .calendar-controls button {
    flex: 1;
  }

  .month-calendar-weekdays,
  .month-calendar-grid {
    gap: 5px;
  }

  .month-calendar-day {
    min-height: 112px;
    padding: 7px;
  }
}

@media (max-width: 640px) {
  .month-calendar-weekdays {
    display: none;
  }

  .month-calendar-grid {
    grid-template-columns: 1fr;
  }

  .month-calendar-day.empty {
    display: none;
  }

  .month-calendar-day {
    min-height: 0;
  }
}



.calendar-detail-shell {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.calendar-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 32, 35, 0.38);
  pointer-events: auto;
}

.calendar-detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  padding: 22px;
  background: var(--panel);
  box-shadow: -18px 0 40px rgba(19, 32, 36, 0.22);
  pointer-events: auto;
}

.calendar-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.calendar-detail-header h2,
.calendar-detail-header p,
.calendar-my-shift h3,
.calendar-my-shift p,
.calendar-role-card h3,
.calendar-role-card p {
  margin: 0;
}

.calendar-detail-header h2 {
  margin-top: 5px;
  font-size: 1.65rem;
  line-height: 1.1;
}

.calendar-detail-close {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 1.45rem;
}

.calendar-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.calendar-detail-summary article,
.calendar-my-shift,
.calendar-role-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.calendar-detail-summary article {
  display: grid;
  gap: 4px;
  text-align: center;
}

.calendar-detail-summary strong {
  font-size: 1.5rem;
  color: var(--teal-dark);
}

.calendar-detail-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-my-shift {
  display: grid;
  gap: 9px;
  border-left: 5px solid var(--teal);
}

.calendar-my-shift.muted-card {
  border-left-color: var(--amber);
}

.calendar-detail-actions,
.calendar-detail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-role-list {
  display: grid;
  gap: 12px;
}

.calendar-role-card {
  display: grid;
  gap: 10px;
}

.calendar-role-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.calendar-role-card header strong {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--green);
  color: #fff;
  font-size: 0.78rem;
}

.calendar-role-card.needs-cover header strong {
  background: var(--red);
}

.calendar-role-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.calendar-role-card li {
  color: var(--ink);
  font-size: 0.9rem;
}

.calendar-detail-footer {
  position: sticky;
  bottom: -22px;
  margin: 0 -22px -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.96);
  backdrop-filter: blur(10px);
}

@media (max-width: 640px) {
  .calendar-detail-panel {
    width: 100%;
    padding: 16px;
  }

  .calendar-detail-summary {
    grid-template-columns: 1fr;
  }

  .calendar-role-card header {
    grid-template-columns: 1fr;
  }
}

/* staff format fix v17 */

.staff-directory-panel {
  max-width: 100%;
  overflow: hidden;
}

.staff-list {
  display: grid;
  gap: 10px;
  max-width: 100%;
}

.staff-row {
  grid-template-columns: minmax(180px, 0.95fr) minmax(220px, 1.35fr) minmax(120px, 150px);
  align-items: start;
  max-width: 100%;
  overflow: hidden;
}

.staff-row > div,
.staff-row fieldset,
.staff-row-actions {
  min-width: 0;
}

.staff-row h4,
.staff-row p {
  overflow-wrap: anywhere;
}

.staff-row .role-checkboxes.compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  max-width: 100%;
}

.staff-row-actions {
  align-self: start;
}

@media (max-width: 1180px) {
  .staff-row {
    grid-template-columns: minmax(180px, 1fr);
  }

  .staff-row .role-checkboxes.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .staff-row .role-checkboxes.compact,
  .staff-row-actions {
    grid-template-columns: 1fr;
  }
}


/* end staff format fix v17 */


.personal-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) minmax(280px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-hero-card,
.next-shift-card,
.welcome-journey-card {
  align-content: start;
  box-shadow: none;
}

.dashboard-hero-card {
  border-color: rgba(15, 92, 95, 0.24);
  background: linear-gradient(135deg, #fffaf1 0%, #eef6f6 100%);
}

.dashboard-hero-card h3,
.next-shift-card h3,
.welcome-journey-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.dashboard-hero-card p,
.next-shift-card p {
  margin: 6px 0 0;
}

.next-shift-card {
  border-left: 5px solid var(--teal);
}

.next-shift-card .ghost-button {
  margin-top: 10px;
}

.welcome-journey-list {
  display: grid;
  gap: 8px;
}

.welcome-journey-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.welcome-journey-list article span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #f1e7d8;
  color: var(--muted);
  font-weight: 800;
}

.welcome-journey-list article.complete span {
  background: var(--teal);
  color: #fff;
}

.welcome-journey-list article strong,
.welcome-journey-list article small {
  display: block;
}

.welcome-journey-list article small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .personal-dashboard {
    grid-template-columns: 1fr;
  }
}



.management-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.event-cover-search {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.event-cover-search input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
}

.availability-panel {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.availability-panel h4 {
  margin: 0 0 4px;
}

.availability-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.availability-panel-header .hint {
  margin: 0;
}

.availability-email-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.availability-email-actions select {
  width: auto;
  min-width: 132px;
  min-height: 36px;
  padding: 6px 9px;
  font-size: 0.82rem;
}

.availability-email-actions .mini-action {
  min-height: 36px;
  white-space: nowrap;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 920px) {
  .availability-panel-header {
    grid-template-columns: 1fr;
  }

  .availability-email-actions {
    justify-content: stretch;
    max-width: none;
  }

  .availability-email-actions select,
  .availability-email-actions .mini-action {
    flex: 1 1 170px;
  }
}

.availability-grid article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.availability-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.shift-action-card {
  cursor: grab;
}

.shift-action-card.drag-over {
  outline: 2px dashed var(--teal);
  outline-offset: 3px;
  background: #eef6f6;
}



.calendar-weather-card,
.mobile-claim-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.calendar-weather-card h3,
.floor-plan-card h3,
.mobile-claim-card h3 {
  margin: 0;
}

.calendar-weather-card p,
.calendar-weather-card small {
  margin: 0;
}

.floor-plan-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "auditorium auditorium"
    "foyer bar";
  gap: 8px;
}

.floor-zone {
  display: grid;
  gap: 6px;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfc;
}

.floor-zone.auditorium { grid-area: auditorium; }
.floor-zone.foyer { grid-area: foyer; }
.floor-zone.bar { grid-area: bar; }

.floor-zone strong {
  color: var(--teal-dark);
}

.floor-zone span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.mobile-claim-card {
  display: none;
}

body.dark-mode {
  background: #101719;
  color: #f2f5f5;
}

body.dark-mode .app-shell,
body.dark-mode .tool-panel,
body.dark-mode .calendar-detail-panel,
body.dark-mode .event-gap-card,
body.dark-mode .staff-row,
body.dark-mode .calendar-weather-card,
body.dark-mode .floor-plan-card,
body.dark-mode .mobile-claim-card,
body.dark-mode .floor-zone {
  background: #182326;
  color: #f2f5f5;
  border-color: #344448;
}

body.dark-mode .hint,
body.dark-mode .floor-zone span,
body.dark-mode small,
body.dark-mode p {
  color: #c7d0d2;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: #101719;
  color: #f2f5f5;
  border-color: #344448;
}

@media (max-width: 720px) {
  .calendar-detail-panel {
    width: 100%;
    padding: 16px;
  }

  .mobile-claim-card {
    display: grid;
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -8px 22px rgba(19, 32, 36, 0.12);
  }
}


.duty-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.duty-section h3 {
  margin: 0;
}

.duty-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.duty-person-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfc;
}

.duty-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.duty-person-card small,
.shift-timeline span,
.emergency-contact-list span {
  color: var(--muted);
}

.shift-timeline {
  display: grid;
  gap: 8px;
}

.shift-timeline article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border-left: 4px solid var(--teal);
  background: #f9fbfc;
  border-radius: 8px;
}

.shift-timeline time {
  font-weight: 800;
  color: var(--teal-dark);
}

.emergency-contact-list {
  display: grid;
  gap: 8px;
}

.emergency-contact-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.emergency-contact-list a {
  color: var(--teal-dark);
  font-weight: 800;
}

body.dark-mode .duty-section,
body.dark-mode .duty-person-card,
body.dark-mode .shift-timeline article,
body.dark-mode .emergency-contact-list article {
  background: #182326;
  color: #f2f5f5;
  border-color: #344448;
}


.tonight-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf1 0%, #eef6f6 100%);
}

.tonight-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.tonight-date {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tonight-role-list {
  display: grid;
  gap: 8px;
}

.tonight-role-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.tonight-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.tonight-role-list strong {
  display: block;
  color: var(--teal-dark);
}

.tonight-role-list p {
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 1.35;
}

.polished-timeline {
  background: #fff;
}

body.dark-mode .tonight-card,
body.dark-mode .tonight-role-list article,
body.dark-mode .polished-timeline {
  background: #182326;
  color: #f2f5f5;
  border-color: #344448;
}

body.dark-mode .tonight-role-list strong {
  color: #d7eeee;
}

body.dark-mode .tonight-role-list p {
  color: #f2f5f5;
}


.timeline-editor {
  display: grid;
  gap: 8px;
}

.timeline-panel {
  align-self: start;
  padding: 14px;
}

.timeline-panel legend {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.timeline-row label {
  margin: 0;
}

@media (max-width: 620px) {
  .timeline-row {
    grid-template-columns: 1fr;
  }
}


/* v27 My volunteering streamline */
.profile-grid {
  align-items: start;
  gap: 12px;
}

.profile-grid .tool-panel {
  align-self: start;
}

.profile-stat-list {
  gap: 8px;
}

.profile-stat-list article {
  padding: 10px 12px;
  min-height: auto;
}

.profile-stat-list article strong {
  font-size: 1.35rem;
  line-height: 1.05;
}

.profile-stat-list article span {
  font-size: 0.78rem;
}

.personal-dashboard {
  margin-bottom: 10px;
}


/* v28 dashboard alignment */
.personal-dashboard{
  display:grid;
  align-items:start;
}

.personal-dashboard > *{
  align-self:start;
}

.milestone-card,
.welcome-card,
.next-shift-card{
  height:100%;
}

.milestone-card{
  margin-top:0!important;
}

.personal-dashboard .tool-panel{
  display:flex;
  flex-direction:column;
}

.personal-dashboard .tool-panel > *:first-child{
  margin-top:0;
}


/* v29 My Area dashboard redesign */
.dashboard-intro-card {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf1 0%, #eef6f6 100%);
}

.dashboard-intro-card h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.dashboard-intro-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.my-area-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

.next-shift-feature {
  border-left: 6px solid var(--teal);
  background: #fff;
}

.next-shift-feature h3 {
  font-size: 1.45rem;
}

.next-shift-date,
.next-shift-role {
  margin: 6px 0;
}

.volunteering-kpi-card .kpi-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.volunteering-kpi-card > .kpi-stat-list {
  gap: 12px;
}

.profile-stat-section {
  display: grid;
  gap: 8px;
}

.profile-stat-section h4 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.95rem;
}

.profile-stat-section .kpi-stat-list {
  gap: 8px;
}

.paid-stat-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.kpi-stat-list article {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.kpi-stat-list .primary-kpi {
  grid-column: 1 / -1;
  background: #eef6f6;
}

.kpi-stat-list .primary-kpi strong {
  font-size: 2rem;
}

.kpi-stat-list .wide-stat {
  grid-column: 1 / -1;
}

.journey-progress-card {
  margin-top: 12px;
}

.journey-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.journey-heading h3 {
  margin: 0;
}

.journey-heading > strong {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--teal);
  color: #fff;
  white-space: nowrap;
}

.journey-combined-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 12px;
}

.progress-milestones {
  display: grid;
  gap: 8px;
}

.progress-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.progress-row strong,
.progress-row span {
  display: block;
}

.progress-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e5eaec;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.redesigned-profile-grid {
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr);
  margin-top: 12px;
}

.profile-form-card {
  max-width: none;
}

body.dark-mode .dashboard-intro-card,
body.dark-mode .kpi-stat-list .primary-kpi,
body.dark-mode .progress-row {
  background: #182326;
  color: #f2f5f5;
  border-color: #344448;
}

@media (max-width: 920px) {
  .my-area-dashboard,
  .journey-combined-grid,
  .redesigned-profile-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin staff directory layout repair */
.staff-form-panel {
  align-self: start;
}

.staff-form-panel .role-checkboxes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-form-panel .role-checkboxes legend {
  grid-column: 1 / -1;
}

.staff-directory-panel {
  min-width: 0;
  width: 100%;
}

.staff-directory-panel h3 {
  margin-bottom: 4px;
}

.staff-search-box {
  max-width: 520px;
  margin: 8px 0 14px;
}

.staff-search-box input {
  min-height: 40px;
}

.staff-directory-panel .staff-list {
  gap: 14px;
}

.staff-directory-panel .staff-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(380px, 1.45fr) minmax(140px, 170px);
  gap: 18px;
  align-items: start;
  overflow: visible;
  padding: 16px;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.staff-row-person,
.staff-row-roles,
.staff-row-actions {
  min-width: 0;
}

.staff-row-person {
  display: grid;
  gap: 10px;
}

.staff-name-block {
  display: grid;
  gap: 3px;
}

.staff-name-block h4 {
  font-size: 1.02rem;
  line-height: 1.2;
}

.staff-name-block span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.staff-name-block strong {
  color: var(--ink);
}

.staff-profile-notes {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e7ed;
  border-radius: 8px;
  background: #f7fbfc;
  padding: 9px;
}

.staff-profile-notes strong {
  color: var(--teal-dark);
  font-size: 0.82rem;
}

.staff-profile-notes span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.staff-profile-notes b {
  color: var(--ink);
}

.staff-row-roles {
  display: grid;
  gap: 12px;
}

.staff-role-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-role-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf7f1;
  color: #175b3c;
  font-size: 0.78rem;
  font-weight: 800;
}

.staff-row-roles .role-checkboxes.compact {
  grid-template-columns: repeat(3, minmax(145px, 1fr));
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f8fbf9;
}

.staff-row-roles .role-checkboxes.compact legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.staff-row-roles .role-checkboxes.compact label {
  min-width: 0;
  align-items: flex-start;
  line-height: 1.25;
  padding: 6px 7px;
  border-radius: 6px;
  background: #fff;
  font-size: 0.84rem;
}

.staff-row-actions {
  grid-template-columns: 1fr;
  align-self: start;
}

.staff-row-actions .mini-action,
.staff-row-actions .ghost-button {
  min-height: 38px;
}

@media (max-width: 1180px) {
  .staff-directory-panel .staff-row {
    grid-template-columns: 1fr;
  }

  .staff-row-roles .role-checkboxes.compact,
  .staff-form-panel .role-checkboxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .staff-row-roles .role-checkboxes.compact,
  .staff-form-panel .role-checkboxes,
  .staff-row-actions {
    grid-template-columns: 1fr;
  }
}

/* Portal navigation */
@media (min-width: 921px) {
  .main-panel {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: start;
    column-gap: 22px;
  }

  .main-panel > .tabs {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 22px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .main-panel > .tabs .tab {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    text-align: left;
    justify-content: flex-start;
    padding: 12px 16px;
  }

  .main-panel > .tab-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
}

.event-gap-role.shift-action-card {
  display: block;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}
.individual-role-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #626865;
  color: #fff;
  border-radius: 4px;
}
.individual-slots { display: grid; gap: 5px; margin-top: 5px; }
.individual-slot {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  min-height: 74px;
  border: 1px solid #9abfcf;
  border-radius: 4px;
  overflow-wrap: anywhere;
  color: #122e39;
}
.individual-slot.filled { background: #d0e4f2; }
.individual-slot.vacant { background: #f2d6d5; border-color: #d9aaa8; }
.individual-slot span, .individual-slot small { font-size: 0.78rem; }
.individual-slot strong { font-size: 0.9rem; }
.individual-slot small { color: #235f7a; }
.individual-slot.vacant strong { justify-self: start; background: #fff; padding: 4px 8px; border-radius: 3px; }

/* Compact event cover columns */
.workspace { width: 100%; max-width: none; padding-left: 12px; padding-right: 12px; }
#tab-events .tool-panel { padding: 8px; }
#tab-events .event-gap-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 7px;
  align-items: start;
}
#tab-events .event-gap-card { padding: 5px; gap: 6px; border-radius: 4px; }
#tab-events .event-gap-header { grid-template-columns: 1fr; gap: 6px; padding-bottom: 6px; }
#tab-events .event-gap-header h4 { font-size: 0.88rem; line-height: 1.3; }
#tab-events .event-gap-header-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
#tab-events .event-gap-header-actions .mini-action { padding: 4px 6px; min-height: 28px; font-size: 0.72rem; }
#tab-events .event-gap-roles { gap: 6px; }
#tab-events .individual-role-heading { padding: 5px 7px; font-size: 0.8rem; }
#tab-events .individual-slot { min-height: 65px; padding: 6px 7px; gap: 3px; }
#tab-events .event-gap-card footer { font-size: 0.72rem; }
@media (min-width: 921px) {
  .main-panel { grid-template-columns: 145px minmax(0,1fr); column-gap: 12px; }
}
@media (max-width: 480px) {
  #tab-events .event-gap-list { grid-template-columns: minmax(0,1fr); }
}

.office-event-pager { display:flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:flex-start; margin:12px 0; }
.office-event-pager button { width:44px; height:40px; padding:6px; font-size:22px; }
.office-event-pager span { font-size:0.85rem; }
.office-event-pager button.upcoming-events { width:auto; padding:6px 12px; font-size:0.85rem; }
.office-event-pager span { margin-left:12px; }

#tab-events .event-add-shift-panel { display:none; }
.individual-slot { position:relative; padding-right:26px !important; }
.slot-menu-button { position:absolute; right:2px; top:2px; width:24px; min-height:24px; padding:0; background:transparent; border:0; color:#123e48; font-size:22px; }
.individual-slot-menu { position:absolute; top:25px; right:0; width:210px; z-index:100; background:white; border:1px solid #bcc9cb; box-shadow:0 4px 18px #0003; border-radius:4px; padding:4px; }
.individual-slot-menu button { display:block; width:100%; text-align:left; padding:8px 10px; min-height:34px; background:white; color:#243638; border:0; border-radius:2px; font-size:0.82rem; }
.individual-slot-menu button:hover { background:#e6f1ee; }
.individual-slot-menu button:disabled { opacity:0.45; }
#tab-events .event-gap-role.shift-action-card { overflow:visible; }

#tab-calendar > .panel-heading {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
}
#calendar-month-label { text-align:center; margin:0; }
@media (max-width: 900px) {
  #tab-calendar > .panel-heading { grid-template-columns: 1fr 1fr; gap:12px; }
  #tab-calendar > .panel-heading .calendar-controls { grid-column:1 / -1; justify-content:flex-end; }
  #calendar-month-label { text-align:right; }
}

.inbox-toolbar { display:flex; gap:12px; align-items:center; }
.inbox-toolbar input { flex:1; min-width:0; }
.inbox-layout { display:grid; grid-template-columns:minmax(220px,32%) minmax(0,1fr); min-height:480px; border:1px solid var(--line); }
.rota-inbox-messages { border-right:1px solid var(--line); max-height:70vh; overflow:auto; }
.inbox-message-row { display:grid; gap:6px; width:100%; text-align:left; padding:14px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:#fff; color:var(--ink); overflow-wrap:anywhere; }
.inbox-message-row[aria-pressed=true] { background:#dfefee; box-shadow:inset 3px 0 #0b6265; }
.inbox-message-row small { color:var(--muted); }
.inbox-reading-pane { padding:20px; min-width:0; max-height:70vh; overflow:auto; background:white; }
.inbox-message-body { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.5; }
@media(max-width:700px){ .inbox-layout{grid-template-columns:1fr;} .rota-inbox-messages{max-height:260px;border-right:0;border-bottom:1px solid var(--line);} .inbox-toolbar{flex-wrap:wrap;} }

#tab-documents .document-form-panel { grid-column:1; grid-row:1; }
#tab-documents .documents-admin-panel { grid-column:2; grid-row:1; min-width:0; }
@media(max-width:900px){
  #tab-documents .admin-grid { grid-template-columns:1fr; }
  #tab-documents .documents-admin-panel { grid-column:1; grid-row:2; }
}

body:not(:has(.tab.active[data-tab="events"], .tab.active[data-tab="staff-stats"])) .split-flap-summary { display:none; }

#tab-staff > .admin-grid { display:block; }
#tab-staff .staff-form-panel { margin-bottom:16px; }
#tab-staff .panel-heading > div { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
#tab-staff .panel-heading .eyebrow { flex-basis:100%; margin-bottom:0; }
#tab-staff .panel-heading h2 { margin:0; }

.manual-event-dialog { width:min(1100px,94vw); max-height:90vh; overflow:auto; padding:20px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--ink); }
.manual-event-dialog::backdrop { background:#0006; }
.manual-event-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.manual-event-dialog > header h2 { margin:0; }
.manual-event-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:start; }
.manual-event-fields .create-event-panel { height:auto; }
@media(max-width:750px){.manual-event-fields{grid-template-columns:1fr;}}

.event-heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.event-heading-actions button { width:auto; min-height:40px; padding:8px 12px; font-size:0.88rem; }
.events-import-status p:empty { display:none; }
.events-import-status p { margin:0 0 12px; }

.my-shift-calendar-panel { margin:16px 0; }
.my-calendar-heading,.my-calendar-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; }
.my-calendar-heading h3 { margin:0; }
.my-calendar-controls button { min-height:34px; padding:6px 10px; }
.my-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; margin-top:12px; }
.my-calendar-weekday { text-align:center; font-size:0.78rem; padding:5px; }
.my-calendar-day { min-height:90px; padding:6px; border:1px solid var(--line); border-radius:4px; min-width:0; background:white; }
.my-calendar-day.empty { background:transparent; border-color:transparent; }
.my-calendar-day.today { border:2px solid #d89a20; }
.my-calendar-day > strong { font-size:0.8rem; }
.my-calendar-shift { display:block; width:100%; text-align:left; font-size:0.75rem; line-height:1.3; padding:5px; min-height:36px; margin-top:4px; background:#276e58; color:white; overflow-wrap:anywhere; }
@media(max-width:600px){ .my-calendar-day{padding:3px;min-height:65px;} .my-calendar-grid{gap:2px;} .my-calendar-shift{font-size:0.65rem;padding:3px;} }

#dashboard-intro { position:relative; padding-right:165px; }
.my-calendar-open { position:absolute; top:20px; right:16px; width:auto; }
@media(max-width:600px){#dashboard-intro{padding-right:16px;}.my-calendar-open{position:static;float:right;margin-left:8px;}}

.my-area-dashboard { grid-template-columns:minmax(250px,0.8fr) minmax(0,1.7fr); align-items:start; }
.my-area-dashboard .next-shift-feature { display:block; min-height:0; height:auto; padding:16px; border-left-width:4px; }
.next-shift-feature .eyebrow { margin:0 0 8px; }
.next-shift-feature h3 { font-size:1.15rem; margin:0 0 12px; }
.next-shift-feature .next-shift-date,.next-shift-feature .next-shift-role { margin:6px 0; }
.next-shift-feature > button { width:auto; min-height:34px; padding:7px 12px; margin-top:10px; }
.my-area-dashboard .volunteering-kpi-card { display:block; padding:16px; }
.volunteering-kpi-card h3 { margin:0 0 12px; }
.volunteering-kpi-card > .kpi-stat-list { display:block; }
.volunteering-kpi-card .profile-stat-section { display:block; }
.volunteering-kpi-card .profile-stat-section .kpi-stat-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.volunteering-kpi-card .kpi-stat-list article { padding:10px; min-width:0; box-shadow:none; border-radius:4px; }
.volunteering-kpi-card .kpi-stat-list article.primary-kpi { grid-column:auto; }
.volunteering-kpi-card .kpi-stat-list article strong { font-size:1.3rem; line-height:1.2; }
.volunteering-kpi-card .kpi-stat-list article span { font-size:0.75rem; line-height:1.3; }
@media(max-width:1100px){.volunteering-kpi-card .profile-stat-section .kpi-stat-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:750px){.my-area-dashboard{grid-template-columns:1fr;}}

#dashboard-intro { padding:0; background:transparent; border:0; box-shadow:none; }
.applause-banner { display:grid; grid-template-columns:1.35fr repeat(3,1fr) 0.8fr; grid-template-rows:auto auto; gap:12px 0; padding:18px 20px; background:#fff; border:2px solid #195c4e; border-radius:6px; color:#114f42; }
.applause-identity { grid-column:1; grid-row:1 / 3; border-right:1px solid #3c8977; padding-right:18px; align-self:center; }
.applause-identity h3 { font-family:Georgia,serif; font-size:1.5rem; line-height:1.05; margin:0 0 8px; color:#171c1a; }
.applause-identity p { font-family:Georgia,serif; font-style:italic; font-weight:700; font-size:0.88rem; margin:0; }
.applause-stat { text-align:center; padding:0 12px; border-right:1px solid #3c8977; }
.applause-stat strong { display:block; font-family:Georgia,serif; font-size:3rem; line-height:1; }
.applause-stat span { display:block; text-transform:uppercase; font-size:0.73rem; font-weight:800; line-height:1.15; margin-top:5px; color:#172b23; }
.applause-hands { text-align:center; font-size:3.4rem; line-height:1; filter:sepia(0.4); }
.applause-progress { grid-column:2 / 5; position:relative; height:20px; border-radius:12px; overflow:hidden; background:#dcdedd; margin:0 18px; }
.applause-progress > div { height:100%; border-radius:12px; background:linear-gradient(#138a75,#00584a); transition:width 0.5s; }
.applause-progress > span { position:absolute; inset:0; text-align:center; line-height:20px; font-size:0.75rem; font-weight:800; color:#102e27; text-shadow:0 0 3px white,0 0 3px white; }
.applause-target { border-left:1px solid #3c8977; text-align:center; color:#172b23; text-transform:uppercase; font-size:0.72rem; line-height:1.1; }
.applause-target strong,.applause-target span { display:block; }
.applause-target strong { font-size:0.88rem; }
.applause-actions { display:flex; justify-content:flex-end; padding:10px 0 0; }
.applause-actions .my-calendar-open { position:static; float:none; margin:0; }
@media(max-width:800px){.applause-banner{grid-template-columns:repeat(3,minmax(0,1fr));padding:14px;}.applause-identity{grid-column:1 / -1;grid-row:auto;border:0;padding:0;}.applause-stat strong{font-size:2.2rem;}.applause-stat{padding:0 4px;}.applause-hands{display:none;}.applause-progress{grid-column:1 / 3;margin:0;}.applause-target{grid-column:3;}}

.applause-hands { filter:none; display:flex; align-items:center; justify-content:center; }
.applause-hands img { width:98px; height:67px; max-width:100%; object-fit:contain; clip-path:inset(7px 3px 0 3px); }
.applause-actions { align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.next-shift-countdown { color:#195c4e; font-size:0.9rem; }
@media(max-width:800px){.applause-hands{display:none;}}

.applause-countdown { grid-column:2 / -1; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; border-top:1px solid #dce9e4; padding:10px 8px 0; margin-left:18px; color:#195c4e; }
.applause-countdown > span { text-transform:uppercase; font-size:0.72rem; font-weight:700; }
.applause-countdown > strong { font-size:1rem; }
.applause-actions { justify-content:flex-end; }
@media(max-width:800px){.applause-countdown{grid-column:1 / -1;margin-left:0;}}

.applause-banner { grid-template-columns:1.35fr repeat(4,minmax(0,1fr)) 0.75fr; }
.applause-next-stat strong { font-size:2.3rem; line-height:1.3; }
.applause-progress { grid-column:2 / 6; }
.applause-target { grid-column:6; }
@media(max-width:900px){
  .applause-banner { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .applause-identity { grid-column:1 / -1; grid-row:auto; border:0; padding:0; }
  .applause-hands { display:none; }
  .applause-stat strong { font-size:2rem; }
  .applause-next-stat strong { font-size:1.5rem; line-height:1.35; }
  .applause-progress { grid-column:1 / 4; margin:0; }
  .applause-target { grid-column:4; }
}

.ticketsolve-missing-flag { display:block; padding:5px 7px; margin-top:6px; border:1px solid #d9b567; background:#fff2cf; color:#654600 !important; border-radius:4px; font-size:0.75rem; font-weight:700; }

.applause-banner { background:#111; color:#fff; border:1px solid #303735; border-radius:5px; grid-template-columns:1.2fr repeat(4,minmax(0,1fr)); box-shadow:0 3px 9px #0002; }
.applause-identity { border-right:2px solid #1bb69c; }
.applause-identity h3 { color:#fff; font-size:1.4rem; }
.applause-stat { border-right:0; }
.applause-stat > strong { display:flex; justify-content:center; gap:3px; font-family:Arial,sans-serif; font-size:2.4rem; }
.departure-digit { position:relative; display:inline-block; min-width:0.64em; padding:5px 3px; background:linear-gradient(#303030 49%,#101010 50%,#292929 53%); border:1px solid #424242; border-radius:3px; font-style:normal; line-height:1; color:white; text-shadow:0 1px 2px black; box-shadow:0 2px 4px #000; }
.departure-digit::after { content:''; position:absolute; top:50%; left:0; right:0; border-top:1px solid #080808; }
.applause-stat > span { color:#e8edeb; font-weight:600; margin-top:8px; }
.applause-hands { display:none; }
.applause-progress { grid-column:2 / 5; background:#343a38; }
.applause-progress > span { color:#fff; text-shadow:0 1px 2px #000; }
.applause-target { grid-column:5; border-color:#326c61; color:#fff; }
.applause-next-stat strong { font-size:1.6rem; padding-top:10px; color:#fff; }
@media(max-width:900px){
 .applause-banner{grid-template-columns:repeat(4,minmax(0,1fr));}
 .applause-identity{grid-column:1 / -1;border-right:0;}
 .applause-stat > strong{font-size:1.65rem;}
 .applause-next-stat strong{font-size:1.2rem;}
 .applause-progress{grid-column:1 / 4;}
 .applause-target{grid-column:4;}
}

.my-area-dashboard { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.my-area-dashboard .next-shift-feature,.my-area-dashboard .volunteering-kpi-card { height:100%; box-sizing:border-box; padding:16px; }
.my-area-dashboard .next-shift-feature { display:flex; flex-direction:column; gap:6px; }
.my-area-dashboard .next-shift-feature > button { align-self:flex-start; margin-top:auto; }
.my-area-dashboard .next-shift-feature h3,.my-area-dashboard .next-shift-feature p { margin-top:0; margin-bottom:6px; }
.volunteering-kpi-card .profile-stat-section .kpi-stat-list { grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:1fr; }
.volunteering-kpi-card .kpi-stat-list article { min-height:66px; box-sizing:border-box; align-content:center; }
.applause-identity { text-align:center; padding:12px 16px; align-self:stretch; display:flex; align-items:center; justify-content:center; }
.applause-identity h3 { margin:0; line-height:1.15; }
.applause-banner { align-items:center; gap:12px 0; padding:18px; }
.applause-stat { min-height:84px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; }
.applause-stat > strong { min-height:52px; align-items:center; }
.applause-stat > span { margin-top:8px; min-height:28px; }
.applause-next-stat > strong { padding-top:0; line-height:1; }
.departure-digit { min-height:48px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; }
.applause-target { padding:0 8px; }
@media(max-width:1100px){.volunteering-kpi-card .profile-stat-section .kpi-stat-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:750px){.my-area-dashboard{grid-template-columns:1fr;}.my-area-dashboard .next-shift-feature > button{margin-top:8px;}}

.my-area-dashboard { grid-template-columns:minmax(240px,0.65fr) minmax(0,1.85fr); }
@media(max-width:750px){.my-area-dashboard{grid-template-columns:1fr;}}

.next-shift-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; margin-bottom:10px; }
.next-shift-heading .eyebrow { margin:0 !important; }
.next-shift-heading .next-shift-calendar-button { position:static; float:none; width:auto; min-height:40px; padding:9px 12px; margin:0; background:var(--teal); color:#fff; border:1px solid var(--teal); font-size:0.86rem; display:inline-flex; align-items:center; gap:6px; }

.rota-pager { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:6px; }
.rota-pager button { width:auto; min-width:36px; min-height:36px; padding:6px 10px; margin:0; }
.rota-pager .rota-page-status { flex:0 1 auto; margin-left:12px; text-align:left; }

#close-my-calendar { display:inline-flex; align-items:center; justify-self:start; align-self:start; width:auto; min-height:32px; padding:6px 10px; margin:0 0 10px; background:var(--teal); border:1px solid var(--teal); color:#fff; font-size:0.8rem; }

.event-role-section { display:grid; gap:5px; min-width:0; }
.event-role-section .individual-slots { margin-top:0; }
.event-role-section .individual-role-heading { margin-bottom:5px; }

@media(min-width:921px){
  .main-panel > .tabs {
    position:sticky;
    top:88px;
    align-self:start;
    height:fit-content;
    max-height:calc(100vh - 104px);
    overflow-y:auto;
    z-index:20;
  }
  .workspace,.main-panel { overflow:visible; }
}

@media(min-width:921px){
  body:has(#portal-main:not(.hidden)) { overflow:hidden; }
  #portal-main:not(.hidden) { display:flex; flex-direction:column; height:calc(100dvh - var(--portal-topbar-height,80px)); min-height:0; overflow:hidden; }
  #portal-main > .split-flap-summary { flex:0 0 auto; margin-top:10px; margin-bottom:10px; }
  #portal-main > .workspace { flex:1 1 auto; min-height:0; height:100%; overflow:hidden; padding-top:10px; padding-bottom:10px; box-sizing:border-box; }
  #portal-main .main-panel { min-height:0; height:100%; overflow:hidden; box-sizing:border-box; }
  #portal-main .main-panel > .tabs { position:static; top:auto; align-self:start; max-height:100%; overflow-y:auto; }
  #portal-main .main-panel > .tab-panel:not(.hidden) { height:100%; min-height:0; overflow-y:auto; overflow-x:hidden; padding-right:8px; box-sizing:border-box; overscroll-behavior:contain; }
}

.applause-banner { grid-template-columns:1.2fr repeat(5,minmax(0,1fr)); }
.applause-progress { grid-column:2 / 6; }
.applause-target { grid-column:6; }
@media(max-width:1000px){
 .applause-banner{grid-template-columns:repeat(5,minmax(0,1fr));}
 .applause-identity{grid-column:1 / -1;grid-row:auto;border:0;}
 .applause-stat > strong{font-size:1.6rem;}
 .applause-next-stat > strong{font-size:1.2rem;}
 .applause-progress{grid-column:1 / 5;}
 .applause-target{grid-column:5;}
}
@media(max-width:550px){
 .applause-banner{grid-template-columns:repeat(2,minmax(0,1fr));}
 .applause-progress{grid-column:1 / -1;}
 .applause-target{grid-column:1 / -1;border:0;}
}

#tab-shifts .rota-role-heading { display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:8px 10px; background:#f0f5f2; color:#174c42; border:1px solid #ccdcd4; border-radius:4px; text-align:left; }
.shift-role-icon { display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; flex:0 0 25px; font-size:1.15rem; background:#fff; border-radius:4px; }

.my-area-dashboard { grid-template-columns:minmax(230px,0.8fr) minmax(180px,0.6fr) minmax(0,1.8fr); }
.next-shift-weather { align-self:stretch; background:#f0f7f7; }
.next-shift-weather h3 { margin:0 0 12px; font-size:1rem; }
.next-shift-weather p { margin:8px 0; font-size:0.85rem; }
.weather-temperature { display:block; font-size:1.6rem; color:#125e58; }
@media(max-width:1100px){.my-area-dashboard{grid-template-columns:1fr 1fr;}.my-area-dashboard .volunteering-kpi-card{grid-column:1 / -1;}}
@media(max-width:650px){.my-area-dashboard{grid-template-columns:1fr;}.my-area-dashboard .volunteering-kpi-card{grid-column:1;}}

.weather-symbol { font-size:3rem; line-height:1.2; margin:10px 0 5px; text-align:center; }
.next-shift-weather .weather-caption { font-weight:700; text-align:center; color:#125e58; margin:8px 0 12px; }

.my-area-dashboard { grid-template-columns:minmax(230px,0.9fr) minmax(280px,1fr) minmax(0,1.8fr); align-items:stretch; }
.my-area-dashboard .next-shift-feature,.my-area-dashboard .volunteering-kpi-card { height:auto; }
.my-area-dashboard .next-shift-weather { display:block; min-height:0; height:auto; padding:14px 16px; overflow:hidden; background:linear-gradient(135deg,#617f8d,#225f69); color:white; border-color:#517d84; }
.weather-card-heading { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:6px; }
.next-shift-weather .weather-card-heading h3 { color:white; font-size:1.15rem; margin:0; }
.weather-card-heading > span { font-size:0.75rem; color:#eef7f8; }
.weather-visual-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0; }
.next-shift-weather .weather-temperature { color:white; font-size:2.3rem; line-height:1.05; }
.weather-condition { display:block; margin-top:5px; font-size:0.9rem; }
.next-shift-weather .weather-symbol { font-size:3.5rem; margin:0; line-height:1; }
.next-shift-weather .weather-caption { text-align:left; margin:6px 0 10px; color:#fff; font-size:0.82rem; }
.weather-mini-details { display:flex; justify-content:space-between; gap:8px; border-top:1px solid #ffffff55; padding-top:8px; font-size:0.75rem; }
.next-shift-weather[data-conditions="Sunny"],.next-shift-weather[data-conditions="Sunny spells"] { background:linear-gradient(135deg,#458bba,#236d92); }
.my-area-dashboard .next-shift-feature { gap:3px; }
.volunteering-kpi-card .kpi-stat-list article { min-height:58px; padding:8px; }
@media(max-width:1200px){.my-area-dashboard{grid-template-columns:1fr 1fr;}.my-area-dashboard .volunteering-kpi-card{grid-column:1 / -1;}}
@media(max-width:650px){.my-area-dashboard{grid-template-columns:1fr;}.my-area-dashboard .volunteering-kpi-card{grid-column:1;}}

.next-shift-weather .met-office-link { display:inline-block; margin-top:10px; color:inherit; font-size:0.8rem; font-weight:700; text-decoration:underline; text-underline-offset:3px; }

.my-area-dashboard .next-shift-weather { position:relative; background:#376d7b url('assets/penzance-weather-scene.png') center 48% / cover; isolation:isolate; }
.next-shift-weather::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#143f50c9,#143f5033);z-index:-1;}
.next-shift-weather[data-conditions="Sunny"],.next-shift-weather[data-conditions="Sunny spells"]{background-image:linear-gradient(115deg,#297ca2,#92bfd0);}
.next-shift-weather .weather-card-heading h3{font-size:1.25rem;}
.next-shift-weather .weather-temperature{font-size:2.7rem;}
.next-shift-weather .weather-symbol{font-size:2.4rem;}
.weather-feels{display:block;font-size:0.75rem;margin-top:4px;}
.weather-hourly-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;background:#153f526e;border-radius:5px;padding:8px 4px;margin-top:10px;}
.weather-hourly-strip>div{display:grid;gap:4px;text-align:center;font-size:0.7rem;}
.weather-hourly-strip>div>span:nth-child(2){font-size:1.15rem;}
.weather-hourly-strip small{font-size:0.66rem;}
.next-shift-weather .weather-caption{font-size:0.78rem;margin:6px 0;}
.my-area-dashboard {grid-template-columns:minmax(230px,0.85fr) minmax(330px,1.15fr) minmax(0,1.6fr);}
@media(max-width:1200px){.my-area-dashboard{grid-template-columns:1fr 1fr;}}
@media(max-width:650px){.my-area-dashboard{grid-template-columns:1fr;}}

.next-shift-weather .weather-symbol { display:none; }

.next-shift-footer-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:auto; padding-top:14px; }
.next-shift-footer-actions > button { width:auto; min-height:36px; padding:7px 10px; }
.next-shift-footer-actions .next-shift-calendar-button { position:static; float:none; margin:0 0 0 auto; background:var(--teal); color:#fff; border:1px solid var(--teal); font-size:0.86rem; display:inline-flex; align-items:center; gap:6px; }

.next-shift-feature .next-shift-role { margin:8px 0 0; font-weight:700; }
.next-shift-feature .next-shift-time { margin:0 0 8px; font-size:1.12rem; font-weight:600; color:var(--teal); }

.volunteering-kpi-card .profile-stat-section .kpi-stat-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:550px){.volunteering-kpi-card .profile-stat-section .kpi-stat-list{grid-template-columns:repeat(2,minmax(0,1fr));}}

.next-shift-title-row { display:flex; align-items:flex-start; gap:14px; margin:4px 0 10px; }
.next-shift-title-row .next-event-artwork { order:2; width:160px; max-width:46%; height:auto; display:block; background:transparent; border-radius:0; flex-shrink:0; align-self:flex-start; }
.next-shift-copy { flex:1; min-width:0; }
.my-area-dashboard .next-shift-copy .next-shift-date { margin-top:10px; }
.next-shift-title-row h3 { margin:0 !important; overflow-wrap:anywhere; }
.event-gap-header { position:relative; }
#tab-events .event-gap-header > div:first-child { padding-right:24px; }
.event-actions-toggle { position:absolute; right:0; top:0; width:26px; min-height:28px; padding:0; background:transparent; border:0; color:var(--ink); font-size:24px; line-height:1; }
.event-actions-toggle:hover { background:#e4eceb; }
.event-actions-menu { position:fixed; inset:auto; margin:0; width:170px; box-sizing:border-box; padding:4px; border:1px solid var(--line); border-radius:4px; background:#fff; box-shadow:0 4px 16px #0003; }
.event-actions-menu button { display:block; width:100%; min-height:36px; padding:8px; text-align:left; border:0; background:#fff; color:var(--ink); font-size:0.82rem; }
.event-actions-menu button:hover,.event-actions-menu button:focus-visible { background:#e6f1ee; }
.event-actions-menu [data-delete-event] { color:#a22432; border-top:1px solid var(--line); }
.login-route-grid { grid-template-columns:minmax(0,1fr); }
.login-route-card > .login-route-icon { display:none; }
.login-choice-panel .login-route-card { display:block; padding:0; border:0; background:transparent; box-shadow:none; }
.login-choice-panel .login-route-card h3 { font-size:1.8rem; margin:0 0 24px; }
.ticketsolve-review-dialog { max-width:760px; }
.ticketsolve-review-list { margin:16px 0; max-height:55vh; overflow:auto; }
.ticketsolve-review-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.ticketsolve-review-row label { display:flex; align-items:center; gap:10px; min-width:0; }
.ticketsolve-review-row input[type="checkbox"] { width:auto; flex:0 0 auto; }
.ticketsolve-review-row span { min-width:0; overflow-wrap:anywhere; }
.ticketsolve-review-row small { display:block; margin-top:4px; }
.ticketsolve-review-row button { flex:0 0 auto; width:auto; }
.pending-cancellation-notices { margin:12px 0; padding:12px; border-left:3px solid #a22432; background:#fff; }
.staff-personal-details { margin:8px 0; font-size:0.85rem; display:grid; gap:8px; }
.staff-personal-details dt { font-weight:700; margin-bottom:2px; }
.staff-personal-details dd { margin:0; white-space:pre-line; overflow-wrap:anywhere; }
.document-actions { flex-wrap:wrap; }
.document-item > div:first-child { min-width:0; }
.document-item h4,.document-item p,.document-item small { overflow-wrap:anywhere; }
.document-form-panel input[type="file"] { width:100%; min-width:0; box-sizing:border-box; }
.account-password-dialog { max-width:480px; }
.delivery-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.delivery-heading button { width:auto; }
.delivery-log-list { max-height:560px; overflow:auto; }
.delivery-log-row { display:grid; gap:5px; padding:12px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.delivery-log-row > button { width:auto; justify-self:start; }
.delivery-status { font-weight:700; color:var(--teal); }
.session-actions { display:flex; align-items:center; gap:8px; }
.session-actions button { width:auto; min-height:34px; padding:6px 10px; font-size:0.85rem; white-space:nowrap; }
.document-read-check { display:flex; align-items:flex-start; gap:8px; margin-top:12px; font-size:0.85rem; line-height:1.4; }
.document-read-check input[type="checkbox"] { width:auto; flex:0 0 auto; margin-top:3px; }
.document-read-report { grid-column:1 / -1; border-top:1px solid var(--line); padding-top:10px; font-size:0.85rem; min-width:0; }
.document-read-report summary,.staff-document-summary summary { cursor:pointer; font-weight:700; color:var(--teal); }
.document-read-table { max-height:320px; overflow:auto; margin-top:8px; }
.document-read-table table { width:100%; border-collapse:collapse; text-align:left; }
.document-read-table td,.document-read-table th { padding:7px; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.staff-document-summary { margin-top:10px; font-size:0.85rem; }
.staff-document-summary ul { padding-left:18px; }
.my-calendar-shift.past-event,.month-calendar-event.past-event { background:#6d7578; color:#fff; border-color:#c8ced1; }
.my-calendar-shift.past-event:hover,.month-calendar-event.past-event:hover { background:#596164; }
body[data-portal-mode="admin"] .month-calendar-event.past-event { background:var(--acorn-blue); border-color:var(--acorn-blue); border-left:4px solid #8096b2; color:#fff; }
body[data-portal-mode="admin"] .month-calendar-event.past-event:hover { background:var(--acorn-blue); }
.event-gap-card.past-event,.rota-column.past-event { filter:grayscale(1); }
@media(max-width:560px){.session-actions{grid-column:1 / -1;}.session-actions button{flex:1;}}
.next-shift-feature .next-shift-footer-actions { clear:both; }

.my-area-dashboard .volunteering-kpi-card { display:flex; flex-direction:column; }
.volunteering-kpi-card > h3 { font-size:1.35rem; line-height:1.2; margin:0 0 14px; }
.volunteering-kpi-card > .kpi-stat-list { flex:1; display:flex; flex-direction:column; min-height:0; }
.volunteering-kpi-card .profile-stat-section { flex:1; display:flex; flex-direction:column; }
.volunteering-kpi-card .profile-stat-section .kpi-stat-list { flex:1; grid-template-rows:repeat(2,minmax(80px,1fr)); }
.volunteering-kpi-card .kpi-stat-list article { height:100%; padding:12px; }
.volunteering-kpi-card .kpi-stat-list article strong { font-size:1.5rem; }
.volunteering-kpi-card .kpi-stat-list article span { font-size:0.82rem; }
@media(max-width:550px){.volunteering-kpi-card .profile-stat-section .kpi-stat-list{grid-template-rows:repeat(3,minmax(80px,1fr));}}

/* Staff profile history additions */

.staff-profile-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 8px;
}

.staff-profile-summary summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--green);
}

.staff-profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  font-size: 0.84rem;
}

.staff-profile-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.84rem;
}

@media (max-width: 620px) {
  .staff-profile-summary-grid {
    grid-template-columns: 1fr;
  }
}
