:root {
  color-scheme: light;
  --bg: #fbf6ea;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #667085;
  --line: #eadfca;
  --teal: #2f7d63;
  --teal-dark: #245f4a;
  --amber: #f5b84b;
  --gold: #e7a93c;
  --gold-dark: #9a5b12;
  --gold-soft: #fff5dc;
  --red: #b42318;
  --green: #2f7d63;
  --blue: #245ca8;
  --shadow: 0 14px 38px rgba(94, 66, 24, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 245, 220, 0.95), rgba(235, 247, 241, 0.65) 280px, transparent 430px),
    var(--bg);
  color: var(--ink);
}

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

input,
select,
textarea {
  font-size: max(16px, 1em);
}

button {
  border: 0;
  cursor: pointer;
}

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

.app {
  min-height: 100vh;
  padding-bottom: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 36px);
  background:
    linear-gradient(135deg, rgba(255, 247, 224, 0.98), rgba(236, 247, 242, 0.9)),
    rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(234, 213, 174, 0.95);
  backdrop-filter: blur(18px);
}

.topbar::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5b84b, #2f7d63, #245ca8);
}

.brand {
  display: flex;
  align-items: center;
  flex: 1 1 250px;
  gap: 12px;
  min-width: 230px;
}

.brand-mark {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(36, 92, 168, 0.14);
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand p,
.user-chip span,
.small,
.muted {
  color: var(--muted);
}

.brand p {
  margin: 2px 0 0;
  font-size: 13px;
  white-space: nowrap;
}

.bohs-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(23, 49, 59, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.bohs-mark {
  display: block;
  width: 34px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.user-chip {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.role-toggle {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.view-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.auth-panel {
  width: min(520px, 100%);
  margin: 0 auto;
}

.auth-options {
  width: min(900px, 100%);
  margin: 0 auto;
}

.site-auth-options {
  align-items: start;
}

.site-auth-options .auth-panel {
  align-self: start;
}

.site-auth-options .panel-head {
  margin-bottom: 12px;
}

.auth-panel .panel-head > div {
  flex-basis: auto;
}

.other-access {
  display: grid;
  gap: 12px;
}

.login-mode-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fffaf0;
}

.login-mode-switch button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.login-mode-switch button.active {
  border-color: rgba(231, 169, 60, 0.64);
  background: var(--gold);
  color: var(--ink);
}

.login-choice {
  display: grid;
  gap: 7px;
  min-height: 118px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.login-choice strong {
  font-size: 17px;
}

.login-choice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.login-choice.active {
  border-color: rgba(231, 169, 60, 0.58);
  background: var(--gold-soft);
}

.auth-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 800;
}

.auth-error-centered {
  width: min(900px, 100%);
  margin: 12px auto 0;
}

.demo-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #cde5dc;
  border-radius: var(--radius);
  background: #f3faf7;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.demo-codes span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
}

.staff-pin-helper {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border: 1px solid #ead6a7;
  border-radius: var(--radius);
  background: #fffaf0;
}

.staff-pin-helper span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.staff-pin-helper strong {
  color: var(--ink);
}

.mini-link {
  padding: 5px 8px;
  border: 1px solid #f1d79f;
  border-radius: 999px;
  background: #ffffff;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 850;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.user-chip strong {
  display: block;
  max-width: 122px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.user-chip span {
  display: block;
  font-size: 11px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 34px);
}

.layout > .grid {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(31, 41, 51, 0.76), rgba(47, 125, 99, 0.72) 54%, rgba(231, 169, 60, 0.62)),
    url("https://images.unsplash.com/photo-1514933651103-005eec06c04b?auto=format&fit=crop&w=1500&q=80") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 0.98;
}

.hero p {
  max-width: 620px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

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

.form-hint {
  padding: 10px 12px;
  border: 1px solid #f1d79f;
  border-radius: var(--radius);
  background: #fff8e8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-hint strong {
  color: var(--ink);
}

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

.panel,
.card,
.stat,
.shift,
.notice,
.message,
.request,
.person,
.doc,
.action-item,
.coverage-row,
.notification-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel {
  min-width: 0;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(94, 66, 24, 0.07);
}

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

.panel-head > div {
  flex: 1 1 220px;
  min-width: 0;
}

.panel-head > .row,
.panel-head > .summary-actions {
  flex: 0 1 auto;
  max-width: 100%;
  flex-wrap: wrap;
}

.panel-head h3,
.panel h3 {
  margin: 0;
  font-size: 18px;
}

.panel-head p,
.panel > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.collapsible-panel > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  list-style: none;
  cursor: pointer;
}

.collapsible-panel > summary > div {
  flex: 1 1 220px;
  min-width: 0;
}

.collapsible-panel > summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel > summary h3 {
  margin: 0;
  font-size: 18px;
}

.collapsible-panel > summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.collapsible-panel .form {
  padding: 0 16px 16px;
}

.summary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.collapsible-panel > .staff-row-list,
.collapsible-panel > .rota-section-list,
.collapsible-panel > .staff-info-list,
.collapsible-panel > .doc {
  padding: 0 16px 16px;
}

.admin-subsection {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.admin-subsection > .stack {
  padding: 0 14px 14px;
}

.collapse-cue {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.collapse-cue::after {
  content: "↓";
  margin-left: 6px;
  font-size: 13px;
}

.collapsible-panel[open] .collapse-cue::after {
  content: "↑";
}

.collapsible-panel[open] .collapse-cue {
  background: var(--gold-soft);
}

.clock-face {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  text-align: center;
}

.time {
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 850;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.clock-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 800;
}

.clock-status.off {
  background: #f4f1ea;
  color: #7c4a03;
}

.clock-rota-note {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid #cde5dc;
  border-radius: var(--radius);
  background: #f8fcfa;
  color: var(--muted);
  font-size: 13px;
}

.clock-rota-note strong {
  color: var(--teal-dark);
}

.clock-rota-note.warn {
  border-color: #f2d9a7;
  background: #fff8e8;
}

.clock-rota-note.warn strong {
  color: var(--gold-dark);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.btn.primary {
  background: var(--gold);
  color: #1f2933;
}

.btn.primary:hover {
  background: #d99528;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.btn.ghost-dark {
  border: 1px solid var(--line);
  background: #fffaf0;
  color: var(--gold-dark);
}

.btn.light {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn.warn {
  background: var(--red);
}

.btn.full {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
}

.stat {
  padding: 14px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.shift,
.notice,
.message,
.request,
.person,
.doc,
.action-item,
.coverage-row,
.notification-item,
.timeline-item {
  padding: 13px;
}

.notification-item {
  border-color: #fde68a;
  background: #fffbeb;
}

.notification-item.seen {
  border-color: var(--line);
  background: #fff;
  opacity: 0.82;
}

.notification-tools {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 12px;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.notification-copy {
  min-width: 0;
}

.notification-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.personal-shift {
  border-color: #cde5dc;
  background: #f8fcfa;
}

.shift-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.shift-detail-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.shift-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shift-detail-grid strong {
  display: block;
  margin-top: 4px;
}

.action-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border-left-width: 4px;
  color: inherit;
  font: inherit;
  text-align: left;
}

.action-link {
  cursor: pointer;
}

.action-link:hover {
  border-color: #d8c8aa;
  box-shadow: 0 8px 20px rgba(94, 66, 24, 0.09);
  transform: translateY(-1px);
}

.action-link:focus-visible {
  outline: 3px solid rgba(231, 169, 60, 0.35);
  outline-offset: 2px;
}

.action-item.green {
  border-left-color: var(--green);
}

.action-item.amber {
  border-left-color: var(--amber);
}

.action-item.red {
  border-left-color: var(--red);
}

.action-item.blue {
  border-left-color: var(--blue);
}

.task-card {
  display: grid;
  gap: 12px;
}

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

.task-card-copy {
  min-width: 0;
}

.task-card-copy strong,
.task-card-copy .small,
.task-card-copy .muted {
  display: block;
  overflow-wrap: anywhere;
}

.task-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 220px;
}

.task-card-badges .badge {
  max-width: 100%;
}

.task-complete-button {
  justify-self: end;
  min-width: 220px;
}

.coverage-row {
  display: grid;
  gap: 8px;
}

.timesheet-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.timesheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 92px;
  gap: 10px;
  align-items: center;
  min-width: 320px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 13px;
}

.timesheet-row.report {
  grid-template-columns: minmax(0, 1fr) 64px 78px 54px;
}

.timesheet-row.holiday {
  grid-template-columns: minmax(0, 1fr) 64px 86px;
}

.timesheet-row.head {
  background: #fff5dc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timesheet-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.timesheet-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.payroll-readiness {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #f1d9a7;
  border-left: 5px solid #f5b84b;
  border-radius: var(--radius);
  background: #fffaf0;
}

.payroll-readiness.ready {
  border-color: #cde5dc;
  border-left-color: var(--teal);
  background: #f4fbf7;
}

.payroll-readiness strong,
.payroll-readiness span {
  display: block;
}

.payroll-readiness > div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.payroll-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payroll-check {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.payroll-check strong,
.payroll-check span,
.payroll-check small {
  display: block;
}

.payroll-check strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.payroll-check span {
  margin-top: 3px;
  font-weight: 850;
}

.payroll-check small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.payroll-check.ok {
  border-color: #cde5dc;
  background: #f4fbf7;
}

.payroll-check.warn {
  border-color: #f4c5bf;
  background: #fff4f2;
}

.payroll-check.soft {
  border-color: #f1d9a7;
  background: #fffaf0;
}

.compact-stats {
  gap: 8px;
}

.compact-stats .stat {
  padding: 10px;
}

.staff-record-summary {
  margin-bottom: 14px;
}

.staff-record-attention {
  margin-bottom: 14px;
}

.record-attention-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.record-attention-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fffaf0;
}

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

.record-attention-row span {
  color: var(--muted);
  font-size: 12px;
}

.attendance-log {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.attendance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.attendance-summary-tile {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fff;
}

.attendance-summary-tile span,
.attendance-summary-tile strong {
  display: block;
}

.attendance-summary-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.attendance-summary-tile strong {
  margin-top: 4px;
  font-size: 24px;
}

.attendance-summary-tile.amber {
  border-color: #f1d9a7;
  background: #fffaf0;
}

.attendance-summary-tile.red {
  border-color: #f4c5bf;
  background: #fff4f2;
}

.attendance-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #f1d9a7;
  border-left: 5px solid #f5b84b;
  border-radius: var(--radius);
  background: #fffaf0;
}

.attendance-log-row strong,
.attendance-log-row span,
.attendance-log-row small {
  display: block;
}

.attendance-log-row span,
.attendance-log-row small {
  color: var(--muted);
  font-size: 12px;
}

.holiday-impact {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #f1d9a7;
  border-left: 5px solid #f5b84b;
  border-radius: var(--radius);
  background: #fffaf0;
}

.holiday-impact strong,
.holiday-impact span,
.holiday-impact small,
.holiday-impact li {
  display: block;
}

.holiday-impact span,
.holiday-impact small,
.holiday-impact li {
  color: var(--muted);
  font-size: 12px;
}

.holiday-impact ul {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.staff-holiday-impact {
  border-left-color: var(--teal);
}

.timesheet-review-form {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.timesheet-review-guidance {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #cde5dc;
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  background: #f4fbf7;
}

.timesheet-review-guidance.warn {
  border-color: #f1d9a7;
  border-left-color: #f5b84b;
  background: #fffaf0;
}

.timesheet-review-guidance strong,
.timesheet-review-guidance span {
  display: block;
}

.timesheet-review-guidance span {
  color: var(--muted);
  font-size: 12px;
}

.timesheet-attendance-warning {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #f1d9a7;
  border-left: 5px solid #f5b84b;
  border-radius: var(--radius);
  background: #fffaf0;
}

.timesheet-attendance-warning strong,
.timesheet-attendance-warning span {
  display: block;
}

.timesheet-attendance-warning span {
  color: var(--muted);
  font-size: 12px;
}

.timesheet-detail {
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fffaf0;
}

.timesheet-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.timesheet-detail summary div {
  display: grid;
  gap: 2px;
}

.timesheet-detail summary span:not(.collapse-cue) {
  color: var(--muted);
  font-size: 12px;
}

.timesheet-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 10px 10px;
}

.manager-correction-history {
  padding: 0 10px 10px;
}

.manager-correction-panel {
  margin-top: 10px;
}

.compact-correction-form {
  padding: 0 10px 10px;
}

.timesheet-detail h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.mini-table {
  display: grid;
  gap: 6px;
}

.mini-table-row {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.mini-table-row span,
.mini-table-row small {
  color: var(--muted);
  font-size: 11px;
}

.mini-table-row strong {
  font-size: 13px;
}

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

.coming-soon-card {
  opacity: 0.68;
  background: #f8fafb;
}

.coming-soon-card::after {
  content: "Coming soon";
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.active-core-card {
  border-color: #bfe6d2;
  background: #f5fffa;
}

.feature-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #fff8e8 0%, #edf8f4 100%);
  border-left: 4px solid var(--gold);
}

.training-teaser {
  background: linear-gradient(135deg, #fff8e8 0%, #f5f7f8 100%);
}

.feature-teaser-copy {
  display: grid;
  gap: 10px;
}

.feature-teaser-copy h3 {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
}

.feature-teaser-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feature-card-stack {
  width: 150px;
  height: 130px;
  position: relative;
}

.feature-card {
  position: absolute;
  width: 92px;
  height: 68px;
  border: 2px solid rgba(31, 42, 50, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card.gold {
  right: 0;
  top: 0;
  background: #fff1c9;
}

.feature-card.green {
  left: 0;
  top: 32px;
  background: #dfeedd;
}

.feature-card.blue {
  right: 18px;
  bottom: 0;
  background: #eef4f7;
}

.training-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.training-lessons {
  display: grid;
  gap: 8px;
}

.training-lessons div,
.training-check {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.training-lessons strong,
.training-check strong {
  display: block;
  margin-bottom: 4px;
}

.training-lessons p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.training-check ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.row > * {
  min-width: 0;
}

.row.start {
  align-items: flex-start;
}

.stack {
  display: grid;
  gap: 10px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  background: var(--gold);
  color: #1f2933;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff5dc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift {
  min-width: 0;
  overflow: hidden;
}

.shift .row.start {
  flex-wrap: wrap;
}

.shift .row.start > span.row {
  flex: 1 1 220px;
  flex-wrap: wrap;
  gap: 8px;
}

.shift strong,
.shift .small,
.shift .muted {
  overflow-wrap: anywhere;
}

.badge.green {
  background: #dcfce7;
  color: #166534;
}

.badge.amber {
  background: #fef3c7;
  color: #92400e;
}

.badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.badge.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.section-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ed;
}

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

.form {
  display: grid;
  gap: 10px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.form textarea {
  min-height: 88px;
  resize: vertical;
}

.form .check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.form .check-row input {
  width: 18px;
  min-height: 18px;
}

.check-grid {
  display: grid;
  gap: 8px;
}

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

.inline-form select {
  min-width: 0;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.inline-unlock-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #f1d79f;
  border-radius: var(--radius);
  background: #fff8e8;
}

.inline-unlock-form strong,
.inline-unlock-form span {
  display: block;
}

.inline-unlock-form span {
  color: var(--muted);
  font-size: 12px;
}

.inline-unlock-form input {
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.export-actions {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2.1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #cde5dc;
  border-radius: var(--radius);
  background: #f8fcfa;
}

.export-actions strong,
.export-actions > div > span {
  display: block;
}

.export-actions > div > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 280px;
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.export-buttons .btn {
  flex: 1 1 180px;
  max-width: 230px;
  min-height: 42px;
  padding-inline: 12px;
}

.rota-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf1ed;
}

.rota-grid {
  display: grid;
  grid-template-columns: minmax(108px, 0.72fr) repeat(var(--day-count), minmax(78px, 1fr)) minmax(58px, 0.36fr);
  gap: 1px;
  min-width: 760px;
  width: 100%;
}

.rota-grid.no-totals {
  grid-template-columns: minmax(108px, 0.72fr) repeat(var(--day-count), minmax(78px, 1fr));
}

.rota-split-stack {
  display: grid;
  gap: 16px;
}

.rota-grid-block {
  display: grid;
  gap: 8px;
}

.rota-split-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.rota-split-title h4 {
  margin: 0;
  font-size: 18px;
}

.rota-split-title span,
.rota-target-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rota-publish-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #ead6a7;
  border-radius: var(--radius);
  background: #fff8e8;
}

.rota-publish-panel strong,
.rota-publish-panel span {
  display: block;
}

.rota-publish-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.staff-full-rota-panel {
  margin-top: 16px;
}

.rota-mode-tabs,
.rota-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.week-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 0 0 12px;
}

.week-controls label {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.week-controls input {
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.staff-week-controls {
  padding: 10px;
  border: 1px solid #ead6a7;
  border-radius: var(--radius);
  background: #fffaf0;
}

.daily-target-panel {
  margin: 0 0 12px;
  background: #fffaf0;
}

.daily-target-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 0 12px 12px;
}

.daily-target-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.daily-target-form input {
  min-height: 38px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.rota-mode-tabs button,
.rota-filter-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.rota-mode-tabs button {
  min-height: 42px;
  padding-inline: 16px;
}

.rota-mode-tabs button.active {
  border-color: rgba(231, 169, 60, 0.58);
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.rota-filter-tabs button.active {
  border-color: rgba(231, 169, 60, 0.58);
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.rota-grid-head,
.rota-grid-name,
.rota-grid-cell,
.rota-grid-total {
  min-height: 44px;
  padding: 6px;
  background: var(--surface);
}

.rota-grid-head {
  display: grid;
  align-content: center;
  text-align: center;
}

.rota-grid-head small {
  color: var(--muted);
  font-size: 11px;
}

.staff-head,
.rota-grid-name {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
}

.rota-grid-name {
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 850;
}

.rota-grid-name.cover {
  background: #fff7ed;
  color: #9a3412;
}

.rota-grid-footer {
  background: #f8fcfa;
  border-top: 1px solid #cde5dc;
}

.rota-grid-cell {
  display: grid;
  align-content: start;
  gap: 6px;
}

.rota-total-head,
.rota-grid-total {
  border-left: 1px solid var(--line);
}

.rota-grid-total {
  display: grid;
  gap: 2px;
  place-items: center;
  background: #fffaf0;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.rota-grid-total strong {
  font-size: 12px;
}

.hours-note {
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
}

.hours-note.muted {
  font-size: 7px;
  line-height: 1;
}

.hours-note.on {
  color: #166534;
}

.hours-note.over {
  color: #92400e;
}

.hours-note.under {
  color: #b91c1c;
}

.hours-note.muted {
  color: var(--muted);
}

.rota-grid-empty {
  grid-column: 1 / -1;
  padding: 10px;
  background: var(--surface);
}

.rota-chip {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 32px;
  padding: 5px 4px;
  border-radius: 7px;
  background: var(--type-bg, #dcfce7);
  color: var(--type-fg, #14532d);
  text-align: center;
  line-height: 1.12;
  font-size: 11px;
  font-weight: 850;
}

.rota-chip span,
.rota-chip small {
  min-width: 0;
}

.rota-chip span {
  white-space: normal;
}

.rota-chip > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-suffix {
  display: inline;
  margin-left: 2px;
  font-size: 0.9em;
  opacity: 0.8;
}

.rota-chip.extra {
  box-shadow: inset 0 0 0 2px rgba(23, 49, 59, 0.16);
}

.rota-chip.selected {
  outline: 3px solid rgba(15, 118, 110, 0.42);
  outline-offset: 2px;
}

.rota-chip.own {
  outline: 3px solid rgba(22, 163, 74, 0.34);
  outline-offset: 2px;
}

.rota-chip.cover {
  border: 2px dashed currentColor;
}

.rota-chip.attendance-flagged {
  border-left: 5px solid #b42318;
  background: #fff5dc;
  color: #7c2d12;
}

.rota-chip small {
  font-size: 9px;
  opacity: 0.78;
}

.rota-empty-cell {
  width: 100%;
  min-height: 36px;
  border: 1px dashed #cbd5d1;
  border-radius: 7px;
  background: #f8faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.save-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.save-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.hours-check-table .timesheet-row:not(.head) {
  border-left: 4px solid transparent;
}

.hours-under {
  border-left-color: var(--gold);
  background: #fffaf0;
}

.hours-over {
  border-left-color: var(--red);
  background: #fff7ed;
}

.hours-on-target {
  border-left-color: var(--green);
  background: #f8fcfa;
}

.save-feedback {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.save-feedback span,
.save-feedback small {
  color: #2f6b34;
  font-size: 12px;
  font-weight: 700;
}

.save-feedback.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.save-feedback.warn span,
.save-feedback.warn small {
  color: #805200;
}

.save-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 850;
}

.save-status span {
  color: #2f6b34;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.save-status.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.save-status.warn span {
  color: #805200;
}

.action-feedback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 8px 20px rgba(47, 125, 99, 0.08);
}

.action-feedback.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.action-feedback strong {
  flex: 0 0 auto;
  font-size: 14px;
}

.action-feedback span {
  color: inherit;
  font-size: 13px;
  font-weight: 750;
  min-width: 0;
}

.manager-action-inbox .grid {
  align-items: stretch;
}

.manager-action-inbox .action-item {
  min-height: 118px;
}

.rota-scroll-controls {
  position: fixed;
  right: 12px;
  bottom: 84px;
  z-index: 45;
  display: grid;
  gap: 8px;
}

.rota-scroll-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(215, 225, 234, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal-dark);
  box-shadow: 0 8px 22px rgba(23, 49, 59, 0.16);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 41, 51, 0.34);
  backdrop-filter: blur(10px);
}

.shift-modal {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  box-shadow: 0 24px 70px rgba(23, 49, 59, 0.28);
}

.attendance-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f4c76e;
  border-radius: var(--radius);
  background: #fffaf0;
}

.attendance-box span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.attendance-summary {
  padding: 9px 10px;
  border-left: 4px solid #b42318;
  border-radius: var(--radius);
  background: #fff5dc;
  color: #7c2d12;
  font-weight: 750;
}

.rota-empty-cell:hover {
  border-color: rgba(231, 169, 60, 0.68);
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.rota-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rota-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--type-bg, #dcfce7);
}

.type-foh {
  --type-bg: #dcfce7;
  --type-fg: #14532d;
}

.type-bar {
  --type-bg: #dbeafe;
  --type-fg: #1e3a8a;
}

.type-glass {
  --type-bg: #cffafe;
  --type-fg: #155e75;
}

.type-kp {
  --type-bg: #fed7aa;
  --type-fg: #9a3412;
}

.type-manager {
  --type-bg: #e9d5ff;
  --type-fg: #581c87;
}

.type-supervisor {
  --type-bg: #fef3c7;
  --type-fg: #92400e;
}

.type-chef {
  --type-bg: #fee2e2;
  --type-fg: #991b1b;
}

.type-lead-chef {
  --type-bg: #ddd6fe;
  --type-fg: #4c1d95;
}

.shift-type-form {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.shift-type-swatch {
  display: block;
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--type-bg);
}

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

.shift .shift-type-form {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.shift .btn.full {
  min-width: 0;
}

.staff-row-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}

.staff-order-groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.staff-info-groups {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.staff-order-group {
  padding: 0;
  background: #fffaf0;
}

.staff-info-group,
.staff-order-group {
  padding: 0;
  background: #fffaf0;
}

.staff-info-group[open],
.staff-order-group[open] {
  overflow: visible;
}

.staff-info-group > summary,
.staff-order-group > summary {
  padding: 12px;
}

.staff-info-group .staff-info-list {
  padding: 0 12px 12px;
}

.staff-order-scroll {
  margin: 0;
  padding: 0 12px 12px;
  max-height: min(430px, 46vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.staff-files-inline {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.attendance-history-inline {
  background: #fff7ed;
}

.staff-absence-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.staff-absence-count {
  min-width: 0;
  padding: 9px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fff;
}

.staff-absence-count span,
.staff-absence-count strong {
  display: block;
}

.staff-absence-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-absence-count strong {
  margin-top: 3px;
  font-size: 22px;
}

.staff-absence-count.amber {
  border-color: #f1d9a7;
  background: #fffaf0;
}

.staff-absence-count.red {
  border-color: #f4c5bf;
  background: #fff4f2;
}

.staff-files-inline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.staff-record-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0;
}

.staff-record-check {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.staff-record-check span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-record-check strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.staff-record-check.good {
  border-color: #cde5dc;
  background: #f4fbf7;
}

.staff-record-check.warn {
  border-color: #f1d9a7;
  background: #fffaf0;
}

.staff-record-check.bad {
  border-color: #f4c5bf;
  background: #fff4f2;
}

.staff-file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.staff-file-missing {
  padding: 9px;
  border: 1px solid #f4c5bf;
  border-radius: var(--radius);
  background: #fff4f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.staff-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #eadfca;
  border-radius: var(--radius);
  background: #fff;
}

.staff-file-row strong,
.staff-file-row span,
.staff-file-row small,
.empty-inline strong,
.empty-inline span {
  display: block;
}

.staff-file-row span,
.staff-file-row small,
.empty-inline span {
  color: var(--muted);
  font-size: 12px;
}

.empty-inline {
  padding: 9px;
  border: 1px dashed #d9c9a8;
  border-radius: var(--radius);
  background: #fff;
}

.staff-file-checklist {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.staff-file-table {
  display: grid;
  gap: 1px;
  margin: 0 14px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.staff-file-table-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 120px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 640px;
  padding: 10px;
  background: var(--surface);
}

.staff-file-table-row.head {
  background: #fff5dc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-file-table-row strong,
.staff-file-table-row small {
  display: block;
}

.staff-file-table-row small {
  color: var(--muted);
  font-size: 11px;
}

.staff-row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
}

.staff-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-row-main small {
  color: var(--muted);
}

.staff-order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 6), 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.nav-btn {
  display: grid;
  gap: 3px;
  place-items: center;
  min-width: 0;
  min-height: 56px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.nav-btn svg,
.icon {
  width: 20px;
  height: 20px;
}

.nav-btn.active {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.empty {
  display: grid;
  gap: 6px;
  min-height: 124px;
  place-items: center;
  border: 1px dashed #cbd5d1;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.empty strong {
  color: var(--ink);
}

.empty span {
  max-width: 280px;
  font-size: 13px;
}

.small {
  font-size: 12px;
}

.muted {
  font-size: 13px;
}

.message.me {
  margin-left: 42px;
  background: var(--gold-soft);
}

.message.them {
  margin-right: 42px;
}

.message.unread {
  border-color: #fde68a;
  background: #fffbeb;
}

.dashboard-message-panel {
  border-color: #fde68a;
  background: #fffbeb;
}

.message-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #f1d79f;
  border-radius: var(--radius);
  background: #fff;
}

.message-preview p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notice-audit {
  margin-top: 12px;
  border: 1px solid #e8d8b8;
  border-radius: var(--radius);
  background: #fffaf0;
  overflow: hidden;
}

.notice-audit.empty-audit {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.notice-audit summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.notice-audit summary span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.notice-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.notice-audit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.notice-audit-person {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

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

.desktop-only {
  display: none;
}

@media (min-width: 780px) {
  .app {
    padding-bottom: 0;
  }

  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
  }

  main.app > .layout:not(:has(.side-nav)) {
    grid-template-columns: minmax(310px, 0.78fr) minmax(520px, 1.22fr);
    align-items: start;
    gap: 24px;
    width: min(1320px, 100%);
  }

  main.app > .layout:not(:has(.side-nav)) > .hero {
    min-height: 360px;
    position: sticky;
    top: 92px;
  }

  main.app > .layout:not(:has(.side-nav)) > .auth-panel {
    width: min(680px, 100%);
  }

  main.app > .layout:not(:has(.side-nav)) > .site-auth-options {
    align-self: start;
  }

  main.app > .layout:not(:has(.side-nav)) > .site-auth-options .auth-panel {
    width: 100%;
  }

  main.app > .layout:not(:has(.side-nav)) > .other-access {
    grid-column: 2;
    width: min(680px, 100%);
    margin: 0 auto;
  }

  .other-access .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) auto auto auto;
    align-items: center;
  }

  .top-actions {
    max-width: 250px;
  }

  .layout.layout-wide,
  .layout:has(.rota-week-panel) {
    width: 100%;
    max-width: none;
    grid-template-columns: 176px minmax(0, 1fr);
    padding-inline: 14px;
  }

  .rota-week-panel {
    padding: 14px;
  }

  .rota-week-panel .rota-grid {
    grid-template-columns: minmax(84px, 0.62fr) repeat(var(--day-count), minmax(56px, 1fr)) minmax(54px, 0.38fr);
    min-width: 690px;
    width: 100%;
  }

  .rota-week-panel .rota-grid-wrap {
    overflow-x: auto;
  }

  .rota-week-panel .rota-chip {
    font-size: 10px;
  }

  .rota-week-panel .rota-chip small {
    display: none;
  }

  .desktop-only {
    display: block;
  }

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

  .side-nav {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 8px;
  }

  .side-nav .nav-btn {
    grid-template-columns: 24px 1fr;
    justify-items: start;
    padding: 0 12px;
    font-size: 14px;
  }

  .bottom-nav {
    display: none;
  }

  .rota-scroll-controls {
    right: 18px;
    bottom: 24px;
  }

  .hero {
    min-height: 350px;
    align-content: end;
    padding: 34px;
  }

  .content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    gap: 16px;
    min-width: 0;
  }
}

@media (min-width: 780px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(260px, 1fr) auto auto;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    max-width: none;
  }

  .view-chip,
  .role-toggle {
    min-height: 36px;
  }
}

@media (min-width: 780px) and (max-width: 1320px) {
  .grid.two.rota-section-list {
    grid-template-columns: 1fr;
  }

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

  .task-card-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .task-complete-button {
    justify-self: stretch;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 12px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .brand p {
    display: none;
  }

  .bohs-badge {
    padding: 4px 6px;
    font-size: 0;
  }

  .bohs-mark {
    width: 32px;
    height: 24px;
  }

  .user-chip strong,
  .user-chip span {
    display: none;
  }

  .user-chip {
    padding: 4px;
  }

  .role-toggle {
    max-width: 88px;
    padding-inline: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .top-actions .role-toggle {
    flex: 1 1 0;
    max-width: none;
  }

  .view-chip {
    flex: 1 1 100%;
    justify-content: center;
  }

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 310px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head > div,
  .collapsible-panel > summary > div {
    flex-basis: auto;
  }

  .panel-head > .row,
  .panel-head > .summary-actions {
    justify-content: flex-start;
  }

  .panel-head .badge {
    align-self: flex-start;
  }

  .notification-row {
    grid-template-columns: 1fr;
  }

  .notification-badges {
    justify-content: flex-start;
  }

  .feature-teaser {
    grid-template-columns: 1fr;
  }

  .feature-card-stack {
    width: 130px;
    height: 104px;
  }

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

  .task-card-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .task-complete-button {
    justify-self: stretch;
    min-width: 0;
  }

  .shift .row.start,
  .request .row.start,
  .person .row.start,
  .doc .row.start,
  .notice .row.start {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
  }

  .inline-unlock-form {
    grid-template-columns: 1fr;
  }

  .export-actions {
    grid-template-columns: 1fr;
  }

  .export-actions > div > span {
    max-width: none;
  }

  .export-buttons {
    justify-content: stretch;
  }

  .export-buttons .btn {
    max-width: none;
  }

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

  .daily-target-form .btn {
    grid-column: 1 / -1;
  }

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

  .payroll-check-list {
    grid-template-columns: 1fr;
  }

  .record-attention-row {
    grid-template-columns: 1fr;
  }

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

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

  .attendance-log-row {
    grid-template-columns: 1fr;
  }

  .staff-row-item {
    grid-template-columns: 1fr;
  }

  .staff-order-actions {
    justify-content: flex-start;
  }
}

.auth-panel .panel-head > div {
  flex-basis: auto;
}
