
:root {
  color-scheme: light;
  --bg: #eef6ff;
  --panel: #ffffff;
  --panel-strong: #f8fbff;
  --surface: rgba(255, 255, 255, 0.92);
  --wash-blue: #e3f1ff;
  --wash-mint: #dcebff;
  --wash-amber: #f1f7ff;
  --wash-rose: #fff0ef;
  --text: #0b1d38;
  --muted: #5a6d88;
  --line: #c7dbf1;
  --line-strong: #94b4d8;
  --navy: #061b3d;
  --blue: #0b63ce;
  --blue-dark: #063f8f;
  --sky: #44a8ff;
  --teal: #0c7ee8;
  --amber: #d97706;
  --sun: #ffd166;
  --red: #c83228;
  --green: #2d8cff;
  --violet: #7c3aed;
  --pink: #d61f69;
  --shadow: 0 16px 42px rgba(7, 26, 59, 0.15);
  --soft-shadow: 0 12px 32px rgba(7, 88, 168, 0.11);
  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:
    radial-gradient(circle at 18% 0%, rgba(68, 168, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #eaf4ff 0%, #f7fbff 48%, #dbeeff 100%);
  color: var(--text);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.is-busy::after {
  animation: spin 800ms linear infinite;
  border: 2px solid currentColor;
  border-radius: 999px;
  border-right-color: transparent;
  content: "";
  height: 14px;
  margin-left: 8px;
  width: 14px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(6, 27, 61, 0.94) 0%, rgba(6, 63, 143, 0.82) 48%, rgba(68, 168, 255, 0.42) 100%),
    url("/brand/aerohire-plane.jpg");
  background-position: center 46%;
  background-size: cover;
  border-bottom: 0;
  box-shadow: 0 16px 42px rgba(7, 26, 59, 0.18);
  color: white;
  display: flex;
  justify-content: space-between;
  min-height: 132px;
  overflow: hidden;
  padding: 20px clamp(16px, 4vw, 42px);
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 0;
}

.brand-logo-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(178, 216, 255, 0.86);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(3, 43, 99, 0.24);
  flex: 0 0 auto;
  padding: 10px 16px;
}

.brand-logo {
  display: block;
  height: 46px;
  max-width: min(42vw, 300px);
  object-fit: contain;
  width: auto;
}

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

.eyebrow {
  color: #cceaff;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.48rem, 3vw, 2.1rem);
  line-height: 1.1;
  margin-bottom: 0;
}

h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  line-height: 1.2;
  margin-bottom: 0;
}

h3 {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0 0 10px;
}

.shell {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 1240px;
  padding: 22px clamp(12px, 3vw, 32px) max(38px, env(safe-area-inset-bottom));
}

@media (min-width: 821px) {
  body[data-page="schedule"][data-view="month"] .shell {
    max-width: 1320px;
    padding-left: clamp(12px, 2vw, 28px);
    padding-right: clamp(12px, 2vw, 28px);
  }
}

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

.page-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 2px;
}

.page-tabs button,
.page-menu > button {
  --tab-color: var(--sky);
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 12px;
  box-shadow: 0 7px 20px rgba(31, 45, 70, 0.06);
  color: var(--text);
  display: flex;
  gap: 9px;
  font-weight: 850;
  justify-content: flex-start;
  min-width: max-content;
  min-height: 50px;
  overflow: hidden;
  padding: 10px 13px;
  position: relative;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.page-tabs button::before,
.page-menu > button::before {
  background: var(--tab-color);
  border-radius: 999px;
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 24px;
  width: 6px;
}

.page-tabs > button:nth-child(2) {
  --tab-color: #1f8fff;
}

.page-tabs > button:nth-child(3) {
  --tab-color: #0b63ce;
}

.page-tabs > button:nth-child(4) {
  --tab-color: #082f6f;
}

.page-tabs > button:nth-child(5) {
  --tab-color: #26a9f4;
}

.page-menu > button {
  --tab-color: #1976d2;
}

.page-tabs button:hover,
.page-tabs button:focus-visible,
.page-menu > button:hover,
.page-menu > button:focus-visible {
  border-color: color-mix(in srgb, var(--tab-color) 42%, var(--line));
  box-shadow: 0 10px 26px rgba(31, 45, 70, 0.1);
  transform: translateY(-1px);
}

.page-tabs button[aria-pressed="true"],
.page-menu > button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--tab-color), color-mix(in srgb, var(--tab-color) 58%, var(--navy)));
  border-color: transparent;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--tab-color) 28%, transparent);
  color: white;
}

.page-tabs button[aria-pressed="true"]::before,
.page-menu > button[aria-pressed="true"]::before {
  background: rgba(255, 255, 255, 0.7);
}

.page-menu {
  flex: 0 0 auto;
  position: relative;
}

.page-menu-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(129, 197, 231, 0.46);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(7, 26, 59, 0.18);
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
}

.page-menu-panel[hidden] {
  display: none;
}

.page-menu-panel button {
  border-radius: 11px;
  box-shadow: none;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.page-menu-panel button::before {
  height: 18px;
  width: 5px;
}

.calendar-only {
  display: none;
}

body:not([data-page="calendar"]) .calendar-only {
  display: none;
}

body[data-page="calendar"] .calendar-only {
  display: inline-flex;
}

body[data-page="calendar"] #bulkButton,
body[data-page="calendar"] #undoButton,
body[data-page="calendar"] .ops-only,
body[data-page="calendar"] .ops-board,
body[data-page="calendar"] .print-header,
body[data-page="today"] #bulkButton,
body[data-page="today"] #undoButton,
body[data-page="today"] #todayButton,
body[data-page="today"] #taskAddButton,
body[data-page="today"] .ops-only,
body[data-page="today"] .segmented,
body[data-page="today"] .period-controls .icon-button,
body[data-page="today"] .print-header,
body[data-page="today"] .staff-filter,
body[data-page="today"] .task-options,
body[data-page="today"] .search-panel,
body[data-page="activity"] #bulkButton,
body[data-page="activity"] #undoButton,
body[data-page="activity"] #todayButton,
body[data-page="activity"] #taskAddButton,
body[data-page="activity"] .ops-only,
body[data-page="activity"] .segmented,
body[data-page="activity"] .period-controls .icon-button,
body[data-page="activity"] .print-header,
body[data-page="activity"] .staff-filter,
body[data-page="activity"] .task-options,
body[data-page="handover"] #bulkButton,
body[data-page="handover"] #undoButton,
body[data-page="handover"] #todayButton,
body[data-page="handover"] #taskAddButton,
body[data-page="handover"] .ops-only,
body[data-page="handover"] .segmented,
body[data-page="handover"] .period-controls .icon-button,
body[data-page="handover"] .print-header,
body[data-page="handover"] .staff-filter,
body[data-page="handover"] .task-options,
body[data-page="handover"] .search-panel,
body[data-page="briefing"] #bulkButton,
body[data-page="briefing"] #undoButton,
body[data-page="briefing"] #todayButton,
body[data-page="briefing"] #taskAddButton,
body[data-page="briefing"] .ops-only,
body[data-page="briefing"] .segmented,
body[data-page="briefing"] .period-controls .icon-button,
body[data-page="briefing"] .print-header,
body[data-page="briefing"] .staff-filter,
body[data-page="briefing"] .task-options,
body[data-page="briefing"] .search-panel,
body[data-page="staff"] #bulkButton,
body[data-page="staff"] #undoButton,
body[data-page="staff"] #todayButton,
body[data-page="staff"] #taskAddButton,
body[data-page="staff"] .ops-only,
body[data-page="staff"] .segmented,
body[data-page="staff"] .period-controls .icon-button,
body[data-page="staff"] .print-header,
body[data-page="staff"] .staff-filter,
body[data-page="staff"] .task-options,
body[data-page="staff"] .search-panel,
body[data-page="documents"] #bulkButton,
body[data-page="documents"] #undoButton,
body[data-page="documents"] #todayButton,
body[data-page="documents"] #taskAddButton,
body[data-page="documents"] .ops-only,
body[data-page="documents"] .segmented,
body[data-page="documents"] .period-controls .icon-button,
body[data-page="documents"] .print-header,
body[data-page="documents"] .staff-filter,
body[data-page="documents"] .task-options,
body[data-page="documents"] .search-panel,
body[data-page="reports"] #bulkButton,
body[data-page="reports"] #undoButton,
body[data-page="reports"] #todayButton,
body[data-page="reports"] #taskAddButton,
body[data-page="reports"] .ops-only,
body[data-page="reports"] .segmented,
body[data-page="reports"] .period-controls .icon-button,
body[data-page="reports"] .print-header,
body[data-page="reports"] .staff-filter,
body[data-page="reports"] .task-options,
body[data-page="reports"] .search-panel,
body[data-page="display"] #bulkButton,
body[data-page="display"] #undoButton,
body[data-page="display"] #todayButton,
body[data-page="display"] #taskAddButton,
body[data-page="display"] .ops-only,
body[data-page="display"] .segmented,
body[data-page="display"] .period-controls .icon-button,
body[data-page="display"] .print-header,
body[data-page="display"] .staff-filter,
body[data-page="display"] .task-options,
body[data-page="display"] .search-panel,
body[data-page="coverage"] #bulkButton,
body[data-page="coverage"] #undoButton,
body[data-page="coverage"] #todayButton,
body[data-page="coverage"] #taskAddButton,
body[data-page="coverage"] .ops-only,
body[data-page="coverage"] .segmented,
body[data-page="coverage"] .period-controls .icon-button,
body[data-page="coverage"] .print-header,
body[data-page="coverage"] .staff-filter,
body[data-page="coverage"] .task-options,
body[data-page="coverage"] .search-panel,
body[data-page="settings"] #bulkButton,
body[data-page="settings"] #undoButton,
body[data-page="settings"] #todayButton,
body[data-page="settings"] #taskAddButton,
body[data-page="settings"] .ops-only,
body[data-page="settings"] .segmented,
body[data-page="settings"] .period-controls .icon-button,
body[data-page="settings"] .print-header,
body[data-page="settings"] .staff-filter,
body[data-page="settings"] .task-options,
body[data-page="settings"] .search-panel {
  display: none;
}

body[data-page="today"] .period-controls h2,
body[data-page="activity"] .period-controls h2,
body[data-page="handover"] .period-controls h2,
body[data-page="briefing"] .period-controls h2,
body[data-page="staff"] .period-controls h2,
body[data-page="documents"] .period-controls h2,
body[data-page="reports"] .period-controls h2,
body[data-page="display"] .period-controls h2,
body[data-page="coverage"] .period-controls h2,
body[data-page="settings"] .period-controls h2 {
  text-align: left;
}

.toolbar {
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(226, 242, 255, 0.96));
  border: 1px solid rgba(117, 176, 231, 0.44);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  padding: 9px;
}

.period-controls,
.view-actions,
.segmented,
.modal-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.period-controls {
  background: rgba(244, 249, 255, 0.94);
  border: 1px solid rgba(160, 194, 230, 0.72);
  border-radius: 14px;
  justify-self: start;
  min-width: 0;
  padding: 5px;
}

.period-controls h2 {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 900;
  min-width: clamp(150px, 18vw, 240px);
  text-align: center;
}

.primary,
.secondary,
.danger,
.icon-button,
.segmented button,
.menu-panel button {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.small-button {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0 10px;
}

.primary {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 58%, var(--sky));
  color: white;
}

.primary:hover,
.primary:focus-visible {
  background: linear-gradient(135deg, #052f70, #0a58b8 56%, #238fe8);
}

.secondary,
.icon-button,
.segmented {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(186, 198, 216, 0.86);
  color: var(--text);
}

.view-actions {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  justify-self: end;
  padding: 5px;
}

.view-actions .secondary,
.view-actions .segmented {
  box-shadow: 0 4px 14px rgba(31, 45, 70, 0.04);
}

.menu {
  position: relative;
}

.menu-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(186, 198, 216, 0.9);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel button {
  background: transparent;
  border-radius: 10px;
  color: var(--text);
  justify-content: flex-start;
  width: 100%;
}

.menu-panel button:hover,
.menu-panel button:focus-visible {
  background: #f0f4fa;
}

.secondary:hover,
.icon-button:hover,
.segmented button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.danger {
  background: #fff5f3;
  color: var(--red);
}

.danger:hover {
  background: #ffe5e0;
}

.icon-button {
  font-size: 1.55rem;
  line-height: 1;
  min-height: 38px;
  min-width: 38px;
  padding: 0;
}

.segmented {
  background: #e7f1fc;
  border-radius: 999px;
  gap: 0;
  overflow: hidden;
  padding: 3px;
}

.segmented button {
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
}

.segmented button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark), var(--blue));
  color: white;
}

.wide-segmented {
  width: 100%;
}

.wide-segmented button {
  flex: 1;
}

.mobile-label {
  display: none;
}

.status {
  background: #eaf4ff;
  border: 1px solid #9fc7ef;
  border-radius: 12px;
  color: #063f8f;
  padding: 10px 12px;
}

.search-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(35, 143, 232, 0.28);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(7, 88, 168, 0.06);
  padding: 6px;
}

.search-panel input {
  background: white;
  border-color: var(--line);
  border-radius: 10px;
  min-height: 36px;
}

.print-header {
  display: none;
}

.daily-print {
  display: none;
}

.staff-filter {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(35, 143, 232, 0.24);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
}

.task-options {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-radius: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 6px 8px;
}

.task-options[hidden] {
  display: none;
}

.compact-check {
  border-radius: 999px;
  font-size: 0.84rem;
  min-height: 34px;
  padding: 6px 11px;
  width: auto;
}

.filter-chip {
  align-items: center;
  background: white;
  border: 1px solid rgba(186, 198, 216, 0.84);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
}

.filter-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  border-color: transparent;
  color: white;
}

.filter-dot {
  background: var(--entry-color, var(--blue));
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.filter-count {
  background: rgba(100, 112, 135, 0.14);
  border-radius: 999px;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  min-width: 20px;
  padding: 4px 6px;
  text-align: center;
}

.filter-chip[aria-pressed="true"] .filter-count {
  background: rgba(255, 255, 255, 0.2);
}

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

.ops-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(34, 180, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 45, 70, 0.06);
  color: var(--text);
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 11px;
  text-align: left;
}

.ops-card.has-no-ops {
  background: #fff7f5;
  border-color: #f6b7ae;
}

.ops-card.has-coverage-warning {
  background: #fffaf0;
  border-color: #edca7b;
}

.ops-card-header {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.ops-card strong {
  font-size: 0.98rem;
}

.ops-card time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ops-mini-list {
  display: grid;
  gap: 4px;
}

.ops-mini-entry,
.ops-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.ops-mini-entry {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-empty.no-ops-text {
  color: var(--red);
}

.task-board {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.task-person-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-left: 4px solid var(--entry-color, var(--blue));
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 45, 70, 0.06);
  color: var(--text);
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 11px;
  text-align: left;
}

.task-person-card[aria-pressed="true"] {
  background: #eef9ff;
  border-color: #9bdcff;
  border-left-color: var(--entry-color, var(--blue));
}

.task-person-card.is-empty {
  opacity: 0.72;
}

.task-person-header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.task-person-name {
  align-items: center;
  display: inline-flex;
  font-weight: 900;
  gap: 7px;
  min-width: 0;
}

.task-person-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-person-count {
  background: #eef2f7;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
}

.task-person-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.task-person-list {
  display: grid;
  gap: 4px;
}

.task-person-item {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-person-empty {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.today-dashboard {
  display: grid;
  gap: 14px;
}

.today-hero,
.today-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(31, 45, 70, 0.07);
}

.today-hero {
  background: linear-gradient(135deg, rgba(229, 243, 255, 0.98), rgba(213, 234, 255, 0.96) 58%, rgba(245, 250, 255, 0.98));
  display: grid;
  gap: 14px;
  padding: 16px;
}

.today-hero.has-red-alert {
  background: linear-gradient(135deg, #fff1ef, #ffe0dc 56%, #fff8f7);
  border-color: #f1a69c;
}

.today-hero.has-orange-alert {
  background: linear-gradient(135deg, #fff8e6, #ffedb8 56%, #fffaf0);
  border-color: #eac465;
}

.today-hero.has-green-alert {
  background: linear-gradient(135deg, #eefdf6, #d8f8ea 56%, #f7fffb);
  border-color: #8dd9b3;
}

.today-hero-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.today-hero h2 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0;
}

.today-hero p {
  color: var(--muted);
  font-weight: 800;
  margin: 4px 0 0;
}

.daily-switch {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(186, 198, 216, 0.76);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
}

.daily-switch button {
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
}

.daily-switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark), var(--blue));
  color: white;
}

.today-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.today-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.today-stat {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.today-stat strong {
  font-size: 1.35rem;
  line-height: 1;
}

.today-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.today-stat.is-warning strong,
.today-stat.is-warning span {
  color: var(--red);
}

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

.today-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.today-panel.is-wide {
  grid-column: 1 / -1;
}

.today-panel.is-urgent {
  background: #fff7f5;
  border-color: #f4b8af;
}

.dashboard-handover-lead {
  border-left: 6px solid var(--blue);
}

.handover-readout p {
  color: var(--text);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.today-panel-header {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.today-panel-header h3 {
  margin: 0;
}

.today-panel-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.notice-list,
.notice-settings-list,
.checklist-item-list,
.global-search-results {
  display: grid;
  gap: 9px;
}

.notice-item,
.notice-settings-row {
  background: rgba(242, 248, 255, 0.9);
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.notice-item.is-important,
.notice-settings-row.is-important {
  border-left-color: #f4a62a;
}

.notice-item.is-urgent,
.notice-settings-row.is-urgent {
  background: #fff4f2;
  border-color: #f7b3aa;
  border-left-color: var(--red);
}

.notice-item span,
.notice-settings-main span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.notice-item p {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 760;
  margin: 0;
}

.notice-settings-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.notice-settings-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notice-form,
.checklist-editor-form {
  display: grid;
  gap: 12px;
}

.checklist-editor-card,
.checklist-card {
  border-left: 5px solid var(--blue);
}

.checklist-run-item {
  justify-content: flex-start;
}

.global-search-modal {
  max-width: 720px;
  width: min(100%, 720px);
}

.global-search-result {
  background: white;
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  text-align: left;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  border-color: rgba(35, 143, 232, 0.62);
  box-shadow: 0 8px 24px rgba(31, 45, 70, 0.08);
}

.global-search-type {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.global-search-result span:not(.global-search-type),
.global-search-result p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  margin: 0;
}

.today-list {
  display: grid;
  gap: 7px;
}

.coverage-radar-panel {
  background: linear-gradient(135deg, #fffaf0, #fff7e8);
  border-color: #edca7b;
}

.coverage-radar-list,
.activity-feed {
  display: grid;
  gap: 8px;
}

.coverage-radar-item {
  background: white;
  border: 1px solid #ead59a;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.coverage-radar-item time {
  color: #704f00;
  font-size: 0.82rem;
  font-weight: 900;
}

.coverage-radar-details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.coverage-radar-details span,
.coverage-radar-more {
  color: #4d5668;
  font-size: 0.8rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.coverage-summary-grid .portal-metric:first-child strong {
  color: var(--red);
}

.coverage-details-card {
  border-left: 6px solid #f4a62a;
}

.coverage-detail-list,
.coverage-detail-errors {
  display: grid;
  gap: 9px;
}

.coverage-detail-item {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(220, 194, 124, 0.82);
  border-radius: 14px;
  display: grid;
  gap: 9px;
  padding: 11px;
}

.coverage-detail-item.is-today {
  background: #fff1ef;
  border-color: #f0a69c;
}

.coverage-detail-item.is-selected {
  box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.16);
}

.coverage-detail-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.coverage-detail-header div {
  display: grid;
  gap: 2px;
}

.coverage-detail-header span,
.coverage-detail-error span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coverage-detail-error {
  background: white;
  border: 1px solid rgba(186, 198, 216, 0.74);
  border-left: 5px solid #f4a62a;
  border-radius: 11px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  text-align: left;
}

.coverage-detail-error.is-danger {
  background: #fff5f3;
  border-color: #f4b8af;
  border-left-color: var(--red);
}

.coverage-detail-error.is-task {
  border-left-color: var(--blue);
}

.is-scroll-target {
  animation: targetPulse 1500ms ease-out 1;
}

@keyframes targetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.44);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(255, 59, 48, 0);
  }
}

.portal-page {
  display: grid;
  gap: 14px;
}

.portal-hero {
  background:
    linear-gradient(135deg, rgba(6, 63, 143, 0.94), rgba(11, 99, 206, 0.86) 58%, rgba(68, 168, 255, 0.68)),
    url("/brand/aerohire-plane.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(7, 26, 59, 0.18);
  color: white;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px);
}

.portal-hero h2 {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 950;
  line-height: 1;
}

.portal-hero p {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 780;
  margin: 0;
  max-width: 720px;
}

.portal-actions,
.portal-card-actions,
.portal-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

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

.portal-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(31, 45, 70, 0.07);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.portal-card.is-blue {
  background: linear-gradient(135deg, #eaf4ff, #f8fbff);
  border-color: rgba(69, 151, 235, 0.35);
}

.portal-card.is-warning {
  background: #fff7f5;
  border-color: #f4b8af;
}

.portal-card.is-display {
  background: #061b3d;
  border-color: rgba(255, 255, 255, 0.14);
  color: white;
}

.portal-card-header {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.portal-card h3 {
  font-size: 1.02rem;
  margin: 0;
}

.portal-card p,
.portal-muted {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 730;
  margin: 0;
}

.portal-card.is-display p,
.portal-card.is-display .portal-muted {
  color: rgba(255, 255, 255, 0.72);
}

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

.portal-list-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(186, 198, 216, 0.64);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.portal-list-item strong {
  font-size: 0.93rem;
}

.briefing-date-actions {
  margin-top: 2px;
}

.briefing-editor-card {
  border-left: 5px solid var(--blue);
}

.briefing-form {
  display: grid;
  gap: 14px;
}

.briefing-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.briefing-field {
  color: var(--text);
  display: grid;
  font-size: 0.84rem;
  font-weight: 900;
  gap: 6px;
}

.briefing-field.is-wide {
  grid-column: 1 / -1;
}

.briefing-field textarea {
  min-height: 92px;
}

.briefing-field.is-wide textarea {
  min-height: 136px;
}

.briefing-checklist {
  background: #f5f9ff;
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0;
  padding: 14px;
}

.briefing-checklist legend {
  color: var(--blue-dark);
  font-weight: 950;
  padding: 0 6px;
}

.briefing-check {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 10px;
  color: var(--text);
  display: flex;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
}

.briefing-check input {
  accent-color: var(--blue);
  min-height: auto;
  width: auto;
}

.briefing-actions {
  align-items: center;
}

.portal-list-item span,
.portal-list-item time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.portal-count {
  background: rgba(11, 99, 206, 0.11);
  border: 1px solid rgba(11, 99, 206, 0.18);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 8px;
}

.portal-metric {
  align-items: start;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-radius: 13px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.portal-metric strong {
  font-size: 1.85rem;
  line-height: 1;
}

.portal-metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.staff-profile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-profile-card {
  border-left: 5px solid var(--staff-color, var(--blue));
}

.staff-profile-name {
  align-items: center;
  display: flex;
  gap: 8px;
}

.staff-profile-dot {
  background: var(--staff-color, var(--blue));
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.display-board {
  background:
    radial-gradient(circle at 18% 10%, rgba(42, 169, 244, 0.26), transparent 28%),
    linear-gradient(135deg, #031129, #073d88 56%, #0a78d1);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(7, 26, 59, 0.26);
  color: white;
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 220px);
  padding: clamp(18px, 3vw, 30px);
}

.display-header {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.display-board h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
}

.display-board p {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 850;
}

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

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

.display-list .portal-list-item {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}

.display-list .portal-list-item span,
.display-list .portal-list-item time {
  color: rgba(255, 255, 255, 0.72);
}

.portal-card.is-display {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.portal-card.is-display.is-notice {
  grid-column: 1 / -1;
}

.activity-page {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.activity-page-header h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
}

.activity-page-header p {
  color: var(--muted);
  font-weight: 750;
  margin: 5px 0 0;
}

.activity-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.activity-action {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-item strong {
  font-size: 0.92rem;
}

.activity-item time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.handover-panel textarea {
  min-height: 118px;
}

.handover-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.handover-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.handover-link {
  align-items: center;
  background: #f2f8ff;
  border: 1px solid #c6def8;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: #06417f;
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  justify-content: flex-start;
  min-height: 34px;
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.handover-link:hover,
.handover-link:focus-visible {
  background: #eef9f7;
  border-color: #99d3cc;
}

.handover-view-modal,
.note-view-modal {
  max-width: 520px;
}

.handover-view-body {
  display: grid;
  gap: 10px;
}

.handover-view-body time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.handover-view-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 750;
  line-height: 1.45;
  min-height: 88px;
  padding: 12px;
  white-space: pre-wrap;
}

.calendar-root {
  min-height: 360px;
}

.weekday-row,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.weekday-row div {
  padding: 0 8px;
}

.month-grid {
  background: rgba(186, 198, 216, 0.76);
  border: 1px solid rgba(186, 198, 216, 0.76);
  border-radius: 16px;
  gap: 1px;
  overflow: hidden;
}

.day-cell {
  background: rgba(255, 255, 255, 0.94);
  min-height: 148px;
  min-width: 0;
  padding: 9px;
}

.day-cell.has-no-ops,
.day-list-day.has-no-ops {
  background: #fff7f5;
}

.day-cell.has-coverage-warning,
.day-list-day.has-coverage-warning,
.day-cell.has-task-warning,
.day-list-day.has-task-warning {
  background: #fffaf0;
}

.day-cell.has-no-ops {
  box-shadow: inset 0 0 0 1px #f6b7ae;
}

.day-cell.has-coverage-warning,
.day-cell.has-task-warning {
  box-shadow: inset 0 0 0 1px #edca7b;
}

.day-cell.has-no-ops .day-number,
.day-list-day.has-no-ops .day-number {
  color: var(--red);
}

.day-cell.is-muted {
  background: #f4f6fa;
  color: var(--muted);
}

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

.day-number {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 30px;
}

.day-cell.is-today .day-number,
.day-list-day.is-today .day-number {
  background: var(--blue);
  color: white;
}

.add-day {
  background: transparent;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 4px 0;
}

.entry-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.month-schedule-list {
  gap: 6px;
}

.month-staff-lanes {
  --staff-count: 3;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(var(--staff-count), minmax(0, 1fr));
  min-height: 92px;
}

.month-staff-lane {
  border: 1px solid #d7deea;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px;
}

.month-staff-lane.is-out {
  background: #eef2f7;
}

.month-staff-lane.is-in {
  background: color-mix(in srgb, var(--staff-color, var(--blue)) 14%, white);
  border-color: color-mix(in srgb, var(--staff-color, var(--blue)) 42%, white);
}

.month-staff-initials {
  align-items: center;
  background: var(--staff-color, var(--blue));
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 950;
  height: 20px;
  justify-content: center;
  justify-self: center;
  line-height: 1;
  min-width: 20px;
  padding: 0 5px;
}

.month-staff-lane.is-out .month-staff-initials {
  background: #a3adbd;
}

.month-staff-empty,
.month-staff-entry,
.month-note-button {
  border-radius: 999px;
  width: 100%;
}

.month-staff-empty {
  background: transparent;
  border: 1px dashed #c4cedc;
  color: #788497;
  font-size: 0.68rem;
  font-weight: 850;
  min-height: 44px;
  padding: 4px 2px;
}

.month-staff-entry-wrap {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.month-staff-entry {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 34%, white);
  color: var(--text);
  display: grid;
  gap: 1px;
  min-height: 34px;
  padding: 5px 3px;
  text-align: center;
}

.month-staff-entry strong {
  font-size: 0.66rem;
  line-height: 1.15;
}

.month-staff-entry span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-note-button {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 24%, white);
  color: color-mix(in srgb, var(--staff-color, var(--blue)) 76%, #172033);
  font-size: 0.62rem;
  font-weight: 900;
  min-height: 24px;
  padding: 2px;
  white-space: normal;
}

body[data-page="schedule"][data-view="month"] .day-cell {
  min-height: 176px;
}

body[data-page="schedule"][data-view="month"] .month-grid .entry-list {
  gap: 5px;
}

body[data-page="schedule"][data-view="month"] .month-staff-lanes {
  gap: 4px;
  grid-template-columns: repeat(var(--staff-count), minmax(24px, 1fr));
  min-height: 112px;
}

body[data-page="schedule"][data-view="month"] .month-staff-lane {
  align-content: start;
  border-radius: 999px 999px 12px 12px;
  min-height: 112px;
  overflow: hidden;
}

body[data-page="schedule"][data-view="month"] .month-staff-lane.is-in {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--staff-color, var(--blue)) 22%, transparent);
}

body[data-page="schedule"][data-view="month"] .month-staff-lane.is-out {
  opacity: 0.84;
}

.schedule-month-strips {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 0 34px 10px 4px;
  scroll-padding-inline: 4px 34px;
  -webkit-overflow-scrolling: touch;
}

.schedule-month-week {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(191, 203, 221, 0.86);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(30, 42, 65, 0.06);
  margin-right: 18px;
  min-width: max(100%, 1096px);
  overflow: hidden;
}

.schedule-strip-days,
.schedule-strip-row {
  display: grid;
  grid-template-columns: 116px repeat(7, minmax(140px, 1fr));
}

.schedule-strip-days::before {
  align-items: center;
  background: linear-gradient(135deg, #f7fbff 0%, #e5f1fd 100%);
  border-bottom: 1px solid #d8e1ed;
  border-right: 1px solid #d8e1ed;
  color: #647087;
  content: "Staff";
  display: flex;
  font-size: 0.72rem;
  font-weight: 950;
  left: 0;
  letter-spacing: 0.06em;
  padding: 0 12px;
  position: sticky;
  text-transform: uppercase;
  z-index: 5;
}

.schedule-strip-day {
  align-items: stretch;
  background: #f8fafc;
  border-bottom: 1px solid #d8e1ed;
  border-right: 1px solid #d8e1ed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 66px;
  padding: 9px 10px 8px;
}

.schedule-strip-day.is-muted {
  background: #f1f4f8;
  color: #7b8493;
}

.schedule-strip-day.has-no-ops {
  background: linear-gradient(135deg, #fff1ef, #ffe2dd);
  box-shadow: inset 0 0 0 2px rgba(224, 58, 48, 0.42), inset 0 4px 0 rgba(224, 58, 48, 0.92);
}

.schedule-strip-day.has-coverage-warning {
  background: linear-gradient(135deg, #fff8e3, #ffefbd);
  box-shadow: inset 0 0 0 2px rgba(217, 160, 34, 0.34), inset 0 4px 0 rgba(217, 160, 34, 0.9);
}

.schedule-strip-day.is-today .schedule-strip-day-label strong {
  background: var(--blue);
  color: white;
}

.schedule-strip-day-header {
  align-items: flex-start;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  min-width: 0;
}

.schedule-strip-day-date {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.schedule-strip-day-label {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.schedule-strip-day-label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-strip-day-label strong {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.05rem;
  height: 30px;
  justify-content: center;
  min-width: 30px;
}

.schedule-strip-warning {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-warning.is-danger {
  background: #c83228;
  border: 1px solid rgba(163, 27, 22, 0.36);
  color: white;
}

.schedule-strip-day.has-no-ops .schedule-strip-day-label strong {
  color: var(--red);
}

.schedule-strip-day.has-coverage-warning .schedule-strip-day-label strong {
  color: #8a5b00;
}

.schedule-strip-day.has-no-ops.is-today .schedule-strip-day-label strong,
.schedule-strip-day.has-coverage-warning.is-today .schedule-strip-day-label strong {
  color: white;
}

.schedule-strip-warning.is-warning {
  background: #fff4cf;
  border: 1px solid rgba(244, 182, 63, 0.34);
  color: #8a5b00;
}

.schedule-strip-day-summary {
  align-items: center;
  display: flex;
  gap: 5px;
  min-height: 24px;
  min-width: 0;
  overflow: hidden;
}

.schedule-strip-summary-pill {
  background: color-mix(in srgb, var(--staff-color, var(--blue)) 18%, white);
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 34%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--staff-color, var(--blue)) 74%, #111318);
  display: block;
  flex: 1 1 auto;
  font-size: 0.7rem;
  font-weight: 950;
  min-width: 0;
  overflow: hidden;
  padding: 5px 8px 4px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-summary-pill.is-empty {
  background: #f1f4f8;
  border-color: #d9e0ea;
  color: #697488;
}

.schedule-strip-more {
  color: #647087;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 950;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-rows {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.schedule-strip-row {
  border-radius: 13px;
  grid-auto-rows: minmax(52px, auto);
  min-height: 52px;
  overflow: hidden;
  position: relative;
}

.schedule-strip-row + .schedule-strip-row {
  border-top: 0;
}

.schedule-strip-person {
  align-items: center;
  background: linear-gradient(135deg, #f9fcff 0%, #e8f3ff 100%);
  border-right: 1px solid #d8e1ed;
  display: flex;
  gap: 8px;
  left: 0;
  min-width: 0;
  overflow: hidden;
  padding: 8px 10px;
  position: sticky;
  white-space: nowrap;
  z-index: 4;
}

.schedule-strip-person span {
  align-items: center;
  background: var(--staff-color, var(--blue));
  border-radius: 999px;
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 950;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 5px;
}

.schedule-strip-person strong {
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-segment {
  align-items: stretch;
  border-right: 1px solid rgba(255, 255, 255, 0.64);
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
  padding: 5px;
  position: relative;
  z-index: 1;
}

.schedule-strip-segment.is-out {
  background: #e7edf5;
  color: #647083;
}

.schedule-strip-segment.is-in {
  background: color-mix(in srgb, var(--staff-color, var(--blue)) 18%, #f7fbff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--staff-color, var(--blue)) 18%, transparent);
  color: color-mix(in srgb, var(--staff-color, var(--blue)) 30%, #111827);
}

.schedule-strip-person + .schedule-strip-segment {
  justify-content: center;
  padding-left: 6px;
}

.schedule-strip-entry-wrap {
  align-items: center;
  align-self: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--staff-color, var(--blue)) 18%, white), color-mix(in srgb, var(--staff-color, var(--blue)) 10%, white));
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 34%, white);
  border-left: 4px solid color-mix(in srgb, var(--staff-color, var(--blue)) 82%, white);
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(21, 31, 49, 0.1);
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 6px 7px;
  min-height: 38px;
  min-width: 0;
  padding: 3px;
  width: auto;
  z-index: 2;
}

.schedule-strip-entry-wrap.is-merged {
  box-shadow: 0 5px 14px rgba(21, 31, 49, 0.13);
}

.schedule-strip-entry,
.schedule-strip-note,
.schedule-strip-out {
  border-radius: 999px;
  min-height: 26px;
}

.schedule-strip-entry {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  color: #172033;
  display: grid;
  font-size: 0.72rem;
  gap: 1px 6px;
  grid-template-columns: minmax(0, 1fr);
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 7px;
  text-align: left;
  white-space: normal;
}

.schedule-strip-entry:hover,
.schedule-strip-entry:focus-visible {
  background: rgba(255, 255, 255, 0.36);
}

.schedule-strip-entry-wrap.is-merged .schedule-strip-entry {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
}

.schedule-strip-initial {
  color: color-mix(in srgb, var(--staff-color, var(--blue)) 38%, #071a3b);
  display: block;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-time {
  color: #435064;
  display: block;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-strip-location {
  color: #516070;
  font-weight: 850;
  opacity: 0.82;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-strip-note {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 24%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--staff-color, var(--blue)) 42%, #071a3b);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 950;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  min-width: 34px;
  padding: 0 6px;
}

.schedule-strip-out {
  align-items: center;
  background: transparent;
  border: 0;
  color: #788395;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  min-height: 30px;
  padding: 0 8px 0 5px;
  width: 100%;
}

.schedule-strip-status {
  align-items: center;
  display: flex;
  font-size: 0;
  justify-content: center;
  opacity: 1;
  width: 100%;
}

.schedule-strip-status::after {
  background: rgba(112, 128, 150, 0.24);
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
  width: 28px;
}

.schedule-strip-out:hover,
.schedule-strip-out:focus-visible {
  background: rgba(255, 255, 255, 0.32);
}

.schedule-strip-out:hover .schedule-strip-status::after,
.schedule-strip-out:focus-visible .schedule-strip-status::after {
  background: rgba(82, 98, 120, 0.38);
}

.schedule-mobile-month {
  display: none;
}

.schedule-mobile-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-mobile-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-mobile-day {
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: center;
}

.month-note-button:hover,
.month-note-button:focus-visible,
.month-staff-entry:hover,
.month-staff-entry:focus-visible {
  transform: translateY(-1px);
}

.entry-dots,
.mobile-day-agenda,
.mobile-week-view {
  display: none;
}

.entry-dot {
  background: var(--entry-color, var(--blue));
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.entry-dot.is-long {
  width: 24px;
}

.entry-more-dot {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.entry {
  background: #eef6ff;
  border: 1px solid #c9def7;
  border-left: 4px solid var(--entry-color, var(--blue));
  border-radius: 10px;
  color: var(--text);
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.entry[data-staff-tone="1"] {
  background: #eef7ff;
  border-color: #c6def8;
  border-left-color: var(--sky);
}

.entry[data-staff-tone="2"] {
  background: #f3f8ff;
  border-color: #c9dbef;
  border-left-color: var(--blue-dark);
}

.entry-swatch {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  margin-right: 6px;
  width: 9px;
}

.entry strong,
.entry span,
.entry small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.entry strong {
  font-size: 0.9rem;
}

.entry span {
  color: #344057;
  font-size: 0.83rem;
}

.entry-location {
  background: color-mix(in srgb, var(--entry-color, var(--blue)) 14%, white);
  border-radius: 999px;
  color: #263247;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  justify-self: start;
  padding: 2px 7px;
}

.entry small {
  color: var(--muted);
  font-size: 0.8rem;
}

.task-entry.has-task-warning {
  background: #fff8e6;
  border-color: #ecc86e;
  border-left-color: var(--amber);
}

.task-entry.priority-urgent {
  background: #fff7f5;
  border-color: #f4b8af;
  border-left-color: var(--red);
}

.task-entry.priority-low {
  background: #f7f9fc;
  border-color: #d9e0ea;
  border-left-color: #8b96a8;
}

.task-entry {
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr);
}

.task-entry .task-remarks-edit {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

.task-entry.is-completed {
  background: #f3f8ff;
  border-color: #c7dbf1;
  border-left-color: var(--sky);
}

.task-entry.is-completed strong {
  text-decoration: line-through;
}

.completion-remarks-field {
  background: #f8fbff;
  border: 1px solid #cfe1f7;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.completion-remarks-field legend {
  color: #104d92;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 5px;
}

.completion-remarks-field textarea,
.completion-modal textarea {
  background: #f4f9ff;
  border-color: #9fc7f7;
}

.modal-summary {
  background: #eef6ff;
  border: 1px solid #c5ddfb;
  border-radius: 10px;
  color: #164a89;
  font-weight: 850;
  margin: 0;
  padding: 10px 12px;
}

.task-complete {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.74rem;
  font-weight: 850;
  gap: 5px;
  min-height: 28px;
}

.task-complete input {
  accent-color: var(--blue);
  min-height: auto;
  width: auto;
}

.task-edit-button {
  background: transparent;
  color: var(--text);
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.task-warning {
  color: #735000;
  font-weight: 850;
}

.task-completion-note {
  background: #eaf4ff;
  border: 1px solid #b7d8fb;
  border-radius: 8px;
  color: #104d92;
  font-weight: 850;
  padding: 4px 6px;
}

.task-priority {
  background: #eef2f7;
  border-radius: 999px;
  color: #3f4b61;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  padding: 2px 7px;
}

.task-priority.is-urgent {
  background: #ffe5e0;
  color: var(--red);
}

.task-warning-dot {
  background: var(--amber);
}

.task-chip {
  background: color-mix(in srgb, var(--entry-color, var(--blue)) 9%, white);
  border-color: color-mix(in srgb, var(--entry-color, var(--blue)) 26%, white);
  border-left-color: var(--entry-color, var(--blue));
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 7px 8px;
}

.task-chip.priority-urgent {
  background: #fff7f5;
  border-color: #f4b8af;
  border-left-color: var(--red);
}

.task-chip.has-task-warning:not(.priority-urgent) {
  background: #fffaf0;
  border-color: #edca7b;
  border-left-color: var(--amber);
}

.task-chip.is-completed {
  background: #f7f9fc;
  border-color: #d9e0ea;
  border-left-color: #9aa5b6;
  opacity: 0.82;
}

.task-chip-main {
  align-items: flex-start;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.task-chip-title {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  display: -webkit-box;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.16;
  overflow: hidden;
}

.task-chip-meta,
.task-chip-detail,
.task-chip-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-chip.is-completed .task-chip-title {
  text-decoration: line-through;
}

.task-chip-meta {
  color: #56637a;
  font-size: 0.72rem;
  font-weight: 800;
}

.task-chip-detail {
  color: #3f4b61;
  font-size: 0.7rem;
  font-weight: 900;
}

.task-chip.priority-urgent .task-chip-detail {
  color: var(--red);
}

.task-chip-note.is-completion {
  background: #eaf4ff;
  border-radius: 999px;
  color: #104d92;
  font-weight: 900;
  padding: 2px 7px;
}

.task-chip-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.task-chip-status {
  margin-top: 4px;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.task-chip-status.is-urgent {
  background: var(--red);
}

.task-chip-status.is-warning {
  background: var(--amber);
}

.task-chip-status.is-done {
  background: var(--blue);
}

.empty-day {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 8px 0;
}

.no-ops {
  background: #fff5f3;
  border: 1px solid #f4b8af;
  border-radius: 8px;
  color: #8a241b;
  font-size: 0.84rem;
  font-weight: 850;
  margin-top: 8px;
  padding: 8px;
}

.coverage-warning {
  background: #fff8e6;
  border: 1px solid #ecc86e;
  border-radius: 8px;
  color: #735000;
  font-size: 0.82rem;
  font-weight: 850;
  margin-top: 8px;
  padding: 8px;
}

.compact-day-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  line-height: 1;
  margin-top: 2px;
  max-width: 100%;
  padding: 5px 8px;
  white-space: nowrap;
}

.compact-day-status.is-danger {
  background: #fff0ed;
  border: 1px solid #f2b6ad;
  color: #8a241b;
}

.compact-day-status.is-warning {
  background: #fff6d8;
  border: 1px solid #e9c76f;
  color: #735000;
}

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

.staff-rota-board {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(186, 198, 216, 0.78);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(31, 45, 70, 0.07);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.staff-rota-grid {
  --staff-count: 3;
  display: grid;
  grid-template-columns: minmax(112px, 0.78fr) repeat(var(--staff-count), minmax(150px, 1fr));
  min-width: max(100%, calc(112px + (var(--staff-count) * 150px)));
}

.staff-rota-corner,
.staff-rota-person,
.staff-rota-date,
.staff-rota-cell {
  border-bottom: 1px solid rgba(217, 224, 234, 0.92);
  border-right: 1px solid rgba(217, 224, 234, 0.92);
  min-width: 0;
}

.staff-rota-corner,
.staff-rota-person {
  background: #f8fafc;
  min-height: 54px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.staff-rota-corner {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  left: 0;
  padding: 10px;
  text-transform: uppercase;
  z-index: 5;
}

.staff-rota-person {
  border-top: 4px solid var(--staff-color, var(--blue));
  display: grid;
  gap: 2px;
  padding: 9px 10px;
}

.staff-rota-person strong {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-rota-person span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-rota-date {
  background: rgba(255, 255, 255, 0.98);
  display: grid;
  gap: 5px;
  left: 0;
  min-height: 88px;
  padding: 10px;
  position: sticky;
  z-index: 2;
}

.staff-rota-date strong {
  font-size: 0.88rem;
}

.staff-rota-date span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.staff-rota-date.has-no-ops {
  background: #fff7f5;
  color: var(--red);
}

.staff-rota-date.has-coverage-warning {
  background: #fffaf0;
}

.staff-rota-date .add-day {
  justify-self: start;
}

.staff-rota-cell {
  display: grid;
  gap: 7px;
  min-height: 88px;
  padding: 8px;
}

.staff-rota-cell.is-out {
  background: #eef2f7;
}

.staff-rota-cell.is-in {
  background: color-mix(in srgb, var(--staff-color, var(--blue)) 13%, white);
}

.staff-rota-entry,
.staff-rota-empty {
  border-radius: 10px;
  min-height: 54px;
  padding: 8px 9px;
  text-align: left;
  width: 100%;
}

.staff-rota-entry {
  background: white;
  border: 1px solid color-mix(in srgb, var(--staff-color, var(--blue)) 35%, white);
  border-left: 4px solid var(--staff-color, var(--blue));
  color: var(--text);
  display: grid;
  gap: 2px;
}

.staff-rota-entry strong {
  font-size: 0.84rem;
}

.staff-rota-entry span,
.staff-rota-entry small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-rota-empty {
  background: transparent;
  border: 1px dashed #c4cedc;
  color: #738096;
  font-size: 0.82rem;
  font-weight: 850;
}

.staff-rota-empty:hover,
.staff-rota-empty:focus-visible {
  background: rgba(255, 255, 255, 0.64);
  border-color: var(--line-strong);
}

.day-list-day {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(186, 198, 216, 0.76);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(31, 45, 70, 0.06);
  padding: 12px;
}

.day-list-title {
  align-items: center;
  display: flex;
  gap: 8px;
  font-weight: 800;
}

.modal-backdrop {
  align-items: center;
  background: rgba(18, 26, 40, 0.52);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(217, 224, 234, 0.86);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(18, 26, 40, 0.22);
  max-height: calc(100vh - 36px);
  max-width: 560px;
  overflow: auto;
  padding: 18px;
  width: min(100%, 560px);
}

.modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.modal-body {
  display: grid;
  gap: 14px;
}

label {
  color: var(--text);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 6px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sublegend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  margin: 2px 0 8px;
}

input,
select,
textarea {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

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

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

.check-option,
.check-line {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
}

.check-option input,
.check-line input {
  accent-color: var(--blue);
  min-height: auto;
  width: auto;
}

.warning-box {
  background: #fff5f3;
  border: 1px solid #f4b8af;
  border-radius: 12px;
  color: #7a1f17;
  font-weight: 750;
  padding: 10px 12px;
}

.cycle-times-list {
  display: grid;
  gap: 8px;
}

.cycle-time-row {
  align-items: end;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(70px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  padding: 10px;
}

.cycle-time-row strong {
  padding-bottom: 10px;
}

.user-form,
.staff-form,
.preset-form,
.recurring-task-form {
  align-items: end;
  display: grid;
  gap: 10px;
}

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

.user-form {
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 0.85fr) minmax(130px, 1fr) auto;
}

.preset-form {
  grid-template-columns: minmax(150px, 1fr) 110px 110px auto;
}

.user-list,
.staff-list,
.preset-list,
.recurring-task-list {
  display: grid;
  gap: 8px;
}

.user-row,
.staff-row,
.preset-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
}

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

.user-row-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 0.85fr) minmax(130px, 1fr);
}

.user-row-fields label {
  font-size: 0.72rem;
  gap: 4px;
}

.user-row-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 760;
  gap: 6px 12px;
  grid-column: 1 / -1;
}

.user-row-actions {
  display: inline-flex;
  gap: 6px;
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.preset-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 104px 104px auto auto;
}

.recurring-task-form {
  align-items: stretch;
}

.recurring-task-row {
  align-items: center;
  background: rgba(245, 250, 255, 0.92);
  border: 1px solid rgba(35, 143, 232, 0.22);
  border-left: 5px solid var(--entry-color, var(--blue));
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 11px;
}

.recurring-task-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recurring-task-main span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.staff-row strong {
  overflow-wrap: anywhere;
}

.staff-row-main {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  min-width: 0;
}

.staff-profile-summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-order-controls {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.staff-order-button {
  min-height: 34px;
  min-width: 34px;
  padding: 0;
}

.staff-colour-input {
  border: 0;
  border-radius: 12px;
  min-height: 34px;
  padding: 0;
  width: 42px;
}

.staff-profile-modal input[type="color"] {
  padding: 3px;
  width: 72px;
}

.profile-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coverage-settings-form {
  display: grid;
  gap: 12px;
}

.settings-body {
  display: grid;
  gap: 14px;
}

.settings-overview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.settings-mini-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.88));
  border: 1px solid rgba(129, 197, 231, 0.38);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(7, 26, 59, 0.07);
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
}

.settings-mini-card strong {
  color: var(--blue-dark);
  font-size: 1.12rem;
  font-weight: 950;
}

.settings-mini-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-page-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.settings-page-section {
  min-width: 0;
}

.settings-page-section:nth-child(1),
.settings-page-section:nth-child(2),
.settings-page-section:nth-child(3),
.settings-page-section:nth-child(4) {
  border-left: 5px solid var(--blue);
}

.settings-page-section:nth-child(3),
.settings-page-section:nth-child(5) {
  border-left-color: var(--sky);
}

.settings-page-section:nth-child(4),
.settings-page-section:nth-child(6) {
  border-left-color: var(--blue-dark);
}

.settings-card-actions {
  align-items: center;
  gap: 10px;
}

.settings-card-actions .settings-note {
  flex: 1 1 260px;
  margin: 0;
}

.settings-section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 45, 70, 0.05);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.settings-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 28px;
}

.settings-heading h3 {
  font-size: 1rem;
  margin: 0;
}

.settings-action-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.settings-action-grid button {
  width: 100%;
}

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

.settings-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  margin: -2px 0 0;
}

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

.audit-item {
  background: white;
  border: 1px solid rgba(186, 198, 216, 0.72);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.audit-item time {
  color: var(--muted);
  font-size: 0.78rem;
}

.entry-history {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.entry-history[hidden] {
  display: none;
}

.entry-history-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  font-weight: 850;
  justify-content: space-between;
  padding: 0;
  text-align: left;
  width: 100%;
}

.entry-history-toggle::after {
  color: var(--muted);
  content: "Hide";
  font-size: 0.76rem;
  font-weight: 850;
}

.entry-history-toggle[aria-expanded="false"]::after {
  content: "Show";
}

.entry-history-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-left: auto;
  margin-right: 12px;
}

.entry-history-list {
  display: grid;
  gap: 8px;
}

.entry-history-list[hidden] {
  display: none;
}

.history-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 8px;
}

.history-item strong {
  font-size: 0.86rem;
}

.history-item span,
.history-item time {
  color: var(--muted);
  font-size: 0.78rem;
}

.spacer {
  flex: 1;
}

.login-page {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(6, 27, 61, 0.82), rgba(6, 63, 143, 0.56) 48%, rgba(68, 168, 255, 0.34)),
    url("/brand/aerohire-plane.jpg");
  background-position: center;
  background-size: cover;
  display: flex;
  justify-content: center;
  padding: 18px;
}

.login-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(7, 26, 59, 0.28);
  display: grid;
  gap: 18px;
  max-width: 430px;
  padding: 30px;
  width: 100%;
}

.login-logo {
  background: white;
  border: 1px solid rgba(210, 223, 237, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(7, 26, 59, 0.1);
  max-width: 330px;
  padding: 12px 14px;
  width: 86%;
}

.login-panel .eyebrow {
  color: var(--blue-dark);
  margin-bottom: -12px;
}

.login-panel h1 {
  color: var(--navy);
}

.login-error {
  color: var(--red);
  font-weight: 700;
  margin: 0;
}

.login-help {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  margin: -4px 0 0;
}

@media (min-width: 821px) {
  .shell {
    align-items: start;
    gap: 12px;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  }

  .page-tabs,
  .toolbar,
  .status,
  .print-header,
  .calendar-root {
    grid-column: 1 / -1;
  }

  .search-panel {
    grid-column: 1;
  }

  .staff-filter {
    align-items: center;
    grid-column: 2;
    min-height: 50px;
  }

  .task-options {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: -2px;
  }

  .ops-board {
    gap: 8px;
  }

  .ops-card {
    gap: 6px;
    min-height: 68px;
    padding: 9px 10px;
  }

  .ops-card .compact-day-status {
    margin-top: 0;
  }

  .task-person-card {
    gap: 5px;
    min-height: 82px;
    padding: 9px 10px;
  }

  .task-person-list {
    display: none;
  }

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

  .month-grid .entry-list {
    gap: 5px;
    margin-top: 6px;
  }

  .month-grid .entry {
    border-radius: 9px;
    gap: 1px;
    padding: 6px 7px;
  }

  .month-grid .entry strong {
    font-size: 0.82rem;
  }

  .month-grid .entry span {
    font-size: 0.76rem;
  }

  .month-grid .entry-location,
  .month-grid .entry small {
    display: none;
  }

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

@media (max-width: 820px) {
  body {
    background: linear-gradient(180deg, #eaf4ff 0%, #f7fbff 48%, #dbeeff 100%);
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .topbar {
    background-position: center 44%;
    display: flex;
    min-height: 72px;
    padding: 9px 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-logo-panel {
    border-radius: 12px;
    padding: 6px 8px;
  }

  .brand-logo {
    height: 27px;
    max-width: 158px;
  }

  .brand-copy .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }

  .brand-copy h1 {
    font-size: 1rem;
  }

  .shell {
    max-width: none;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  }

  .page-tabs {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(129, 197, 231, 0.46);
    border-radius: 24px;
    bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 16px 42px rgba(7, 26, 59, 0.18);
    display: flex;
    gap: 4px;
    overflow: visible;
    left: 10px;
    margin: 0;
    padding: 6px;
    position: fixed;
    right: 10px;
    top: auto;
    z-index: 44;
  }

  .page-tabs > button {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
    flex: 1 1 0;
    display: inline-flex;
    font-size: 0.66rem;
    justify-content: center;
    min-height: 48px;
    min-width: 0;
    padding: 0 3px;
    text-align: center;
  }

  .page-tabs > button::before {
    display: none;
  }

  #schedulePageButton {
    font-size: 0;
  }

  #schedulePageButton::after {
    content: "Ops";
    font-size: 0.66rem;
  }

  #briefingPageButton {
    font-size: 0;
  }

  #briefingPageButton::after {
    content: "Brief";
    font-size: 0.66rem;
  }

  .page-menu {
    flex: 1 1 0;
    min-width: 0;
  }

  .page-menu > button {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
    display: inline-flex;
    font-size: 0.66rem;
    justify-content: center;
    min-height: 48px;
    min-width: 0;
    padding: 0 3px;
    text-align: center;
    width: 100%;
  }

  .page-menu > button::before {
    display: none;
  }

  .page-menu-panel {
    bottom: calc(100% + 10px);
    left: auto;
    min-width: 210px;
    right: 0;
    top: auto;
  }

  .page-menu-panel button {
    flex: none;
    justify-content: flex-start;
    min-height: 42px;
    padding: 9px 11px;
    text-align: left;
  }

  .page-menu-panel button::before {
    display: block;
  }

  .page-tabs button:hover,
  .page-tabs button:focus-visible,
  .page-menu > button:hover,
  .page-menu > button:focus-visible {
    box-shadow: none;
    transform: none;
  }

  .portal-page {
    gap: 10px;
    padding: 0 12px 12px;
  }

  .portal-hero {
    border-radius: 18px;
    padding: 18px;
  }

  .portal-grid,
  .portal-grid.two-col,
  .briefing-field-grid,
  .staff-profile-grid,
  .display-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .briefing-actions {
    align-items: stretch;
  }

  .portal-card,
  .today-panel {
    border-radius: 14px;
  }

  .display-board {
    border-radius: 18px;
    margin: 0 12px 12px;
  }

  .toolbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(230, 246, 255, 0.96));
    border: 0;
    border-bottom: 1px solid rgba(129, 197, 231, 0.42);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 10px 26px rgba(7, 88, 168, 0.1);
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 10px 12px 9px;
    position: sticky;
    top: 0;
    z-index: 28;
  }

  .period-controls {
    background: transparent;
    border: 0;
    border-radius: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    justify-self: stretch;
    padding: 0;
    width: 100%;
  }

  body[data-page="today"] .period-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="today"] .period-controls h2 {
    text-align: left;
  }

  .period-controls h2 {
    color: var(--navy);
    font-size: clamp(1.55rem, 7.4vw, 2.15rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0;
    text-align: center;
  }

  body[data-view="week"] .period-controls h2 {
    align-self: center;
    font-size: clamp(1.18rem, 5.6vw, 1.55rem);
  }

  .icon-button {
    background: #f8f8fa;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 5px 16px rgba(20, 24, 32, 0.06);
    font-size: 1.3rem;
    min-height: 34px;
    min-width: 34px;
  }

  .view-actions {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    gap: 6px;
    justify-content: center;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0 0 2px;
    position: static;
    z-index: auto;
  }

  .view-actions::-webkit-scrollbar {
    display: none;
  }

  .view-actions > *,
  .view-actions .secondary,
  .view-actions .primary {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
  }

  .view-actions .segmented {
    background: #f2f3f6;
    border: 0;
    flex: 0 0 108px;
    min-width: 108px;
    padding: 2px;
    width: 108px;
  }

  .view-actions .secondary,
  .view-actions .segmented button {
    border-radius: 999px;
    font-size: 0.68rem;
    min-height: 31px;
    padding: 0 7px;
  }

  .view-actions #todayButton {
    width: 48px;
  }

  .view-actions #taskAddButton {
    width: 46px;
  }

  .view-actions #bulkButton {
    width: 44px;
  }

  .view-actions #undoButton {
    width: 48px;
  }

  .view-actions .menu {
    flex: 0 0 auto;
    min-width: 0;
    position: static;
    width: auto;
  }

  .view-actions #moreButton {
    padding: 0;
    width: 34px;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .menu-panel {
    bottom: auto;
    position: fixed;
    right: 12px;
    top: 112px;
    width: min(240px, calc(100vw - 24px));
    z-index: 46;
  }

  .search-panel {
    margin: 10px 12px 0;
    max-width: calc(100vw - 24px);
    padding: 6px;
  }

  .search-panel input {
    border-radius: 999px;
    font-size: 0.86rem;
    min-height: 34px;
    padding: 7px 12px;
  }

  .staff-filter {
    background: rgba(255, 255, 255, 0.78);
    flex-wrap: nowrap;
    gap: 6px;
    margin: 8px 12px 0;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    padding: 7px;
  }

  .staff-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto;
    font-size: 0.78rem;
    min-height: 32px;
    padding: 0 10px;
  }

  .task-options {
    background: rgba(255, 255, 255, 0.78);
    justify-content: flex-start;
    margin: 8px 12px 0;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    padding: 7px;
  }

  .task-options::-webkit-scrollbar {
    display: none;
  }

  .compact-check {
    flex: 0 0 auto;
    font-size: 0.78rem;
    min-height: 32px;
    padding: 5px 10px;
  }

  .task-board {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    max-width: 100%;
    overflow-x: auto;
    padding: 0 12px 2px;
    scroll-snap-type: x proximity;
    width: 100%;
  }

  .task-board::-webkit-scrollbar {
    display: none;
  }

  .task-person-card {
    border-radius: 14px;
    flex: 0 0 188px;
    min-height: 104px;
    padding: 9px;
    scroll-snap-align: start;
  }

  .task-person-card strong,
  .task-person-name {
    font-size: 0.88rem;
  }

  .task-person-meta,
  .task-person-item,
  .task-person-empty {
    font-size: 0.72rem;
  }

  .today-dashboard {
    gap: 10px;
    padding: 0 12px 18px;
  }

  .today-hero,
  .today-panel {
    border-radius: 16px;
  }

  .today-hero {
    gap: 12px;
    padding: 14px;
  }

  .today-hero-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-switch {
    width: 100%;
  }

  .daily-switch button {
    flex: 1;
  }

  .today-hero h2 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

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

  .today-stat {
    border-radius: 12px;
    padding: 9px;
  }

  .today-grid {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .coverage-radar-item {
    grid-template-columns: 1fr;
  }

  .activity-page {
    border-radius: 16px;
    margin: 12px;
    padding: 12px;
  }

  .activity-item {
    border-radius: 12px;
  }

  .today-panel {
    padding: 12px;
  }

  .today-panel.is-wide {
    grid-column: auto;
  }

  .handover-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .ops-board {
    display: none;
  }

  .ops-card {
    border-radius: 10px;
    gap: 5px;
    min-height: 68px;
    padding: 8px;
  }

  .ops-card strong {
    font-size: 0.9rem;
  }

  .ops-card time,
  .ops-mini-entry,
  .ops-empty {
    font-size: 0.72rem;
  }

  .segmented button {
    flex: 1;
  }

  .weekday-row {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(186, 198, 216, 0.68);
    color: #111318;
    display: grid;
    font-size: 0.72rem;
    margin: 0;
    padding: 0 8px 6px;
    position: sticky;
    top: 110px;
    width: 100%;
    z-index: 12;
  }

  .weekday-row div {
    padding: 0;
    text-align: center;
  }

  .month-grid {
    background: rgba(255, 255, 255, 0.62);
    border: 0;
    border-radius: 0;
    gap: 0;
    overflow: visible;
    width: 100%;
  }

  .day-cell {
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    box-shadow: inset 0 -1px 0 #e8eaee;
    min-height: 64px;
    padding: 5px 4px 4px;
  }

  .day-cell.has-no-ops {
    background: #fffafa;
    box-shadow: inset 0 -1px 0 #f2d3cf;
  }

  .day-cell.has-coverage-warning {
    background: #fffaf0;
    box-shadow: inset 0 -1px 0 #ecd797;
  }

  .day-cell.has-no-ops .day-number {
    background: transparent;
    color: #111318;
  }

  .day-cell.is-muted {
    background: white;
    color: #8b8f98;
    display: block;
  }

  .day-cell.is-selected:not(.is-today) .day-number {
    background: #e9eaee;
  }

  .day-cell.has-no-ops.is-selected:not(.is-today) .day-number {
    background: #ffd8d3;
    color: var(--red);
  }

  .day-cell.is-today .day-number,
  .day-list-day.is-today .day-number,
  .mobile-week-day.is-today .mobile-week-number {
    background: #ff3b30;
    color: white;
  }

  .mobile-week-day.has-no-ops .mobile-week-number {
    background: #ffe8e5;
    color: var(--red);
  }

  .mobile-week-day.has-no-ops.is-today .mobile-week-number {
    background: #ff3b30;
    color: white;
  }

  .mobile-week-day.has-coverage-warning .mobile-week-number {
    background: #fff0bd;
    color: #6d4b00;
  }

  .day-header {
    justify-content: center;
  }

  .day-number {
    font-size: clamp(1.14rem, 5.5vw, 1.5rem);
    font-weight: 850;
    height: 32px;
    min-width: 32px;
  }

  .month-grid .add-day,
  .month-grid .entry-list {
    display: none;
  }

  body[data-page="schedule"][data-view="month"] .day-cell {
    min-height: 112px;
    padding: 4px;
  }

  body[data-page="schedule"][data-view="month"] .month-grid .entry-list {
    display: grid;
    gap: 3px;
    margin-top: 3px;
  }

  body[data-page="schedule"][data-view="month"] .month-grid .entry-dots,
  body[data-page="schedule"][data-view="month"] .month-grid .empty-day {
    display: none;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-lanes {
    gap: 2px;
    min-height: 66px;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-lane {
    border-radius: 7px;
    gap: 2px;
    padding: 2px;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-initials {
    font-size: 0.55rem;
    height: 16px;
    min-width: 16px;
    padding: 0 3px;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-empty {
    border-radius: 6px;
    font-size: 0.56rem;
    min-height: 32px;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-entry {
    border-radius: 6px;
    min-height: 28px;
    padding: 3px 2px;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-entry strong,
  body[data-page="schedule"][data-view="month"] .month-note-button {
    font-size: 0.54rem;
  }

  body[data-page="schedule"][data-view="month"] .month-staff-entry span {
    display: none;
  }

  body[data-page="schedule"][data-view="month"] .month-note-button {
    border-radius: 6px;
    min-height: 20px;
  }

  .schedule-month-strips {
    display: none;
  }

  .schedule-mobile-month {
    display: grid;
    gap: 0;
    padding: 0 12px 20px;
  }

  .schedule-mobile-weekdays {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(186, 198, 216, 0.7);
    color: #111318;
    font-size: 0.72rem;
    font-weight: 850;
    margin: 0 -12px;
    padding: 0 12px 6px;
    position: sticky;
    text-transform: uppercase;
    top: 110px;
    z-index: 12;
  }

  .schedule-mobile-weekdays span {
    text-align: center;
  }

  .schedule-mobile-grid {
    background: rgba(220, 225, 234, 0.86);
    border-bottom: 1px solid rgba(220, 225, 234, 0.86);
    border-top: 1px solid rgba(220, 225, 234, 0.86);
    gap: 1px;
    margin: 0 -12px;
  }

  .schedule-mobile-day {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 1px rgba(221, 227, 237, 0.54);
    display: grid;
    gap: 5px;
    grid-template-rows: auto 1fr;
    min-height: 90px;
    padding: 5px 4px 6px;
    position: relative;
    touch-action: manipulation;
  }

  .schedule-mobile-day.is-muted {
    background: #fbfcfe;
    color: #8b8f98;
  }

  .schedule-mobile-day.has-no-ops {
    background: #fff7f5;
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.12);
  }

  .schedule-mobile-day.has-no-ops::before,
  .schedule-mobile-day.has-coverage-warning::before {
    display: none;
  }

  .schedule-mobile-day.has-no-ops:not(.is-selected) .schedule-mobile-day-number {
    color: #d92d20;
  }

  .schedule-mobile-day.has-coverage-warning {
    background: #fffaf0;
    box-shadow: inset 0 0 0 1px rgba(244, 182, 63, 0.22);
  }

  .schedule-mobile-day-top {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .schedule-mobile-day-number {
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(221, 227, 237, 0.9);
    box-shadow: 0 2px 7px rgba(23, 32, 51, 0.08);
    color: #111318;
    display: inline-flex;
    font-size: clamp(1.14rem, 5.5vw, 1.46rem);
    font-weight: 950;
    height: 35px;
    justify-content: center;
    justify-self: center;
    min-width: 35px;
  }

  .schedule-mobile-warning {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.46rem;
    font-weight: 950;
    line-height: 0.95;
    max-width: 100%;
    overflow: visible;
    padding: 3px 4px;
    text-align: center;
    white-space: normal;
  }

  .schedule-mobile-warning.is-danger {
    background: #fff1ef;
    border: 1px solid rgba(255, 59, 48, 0.18);
    color: #c12a21;
  }

  .schedule-mobile-warning.is-warning {
    background: #fff4cf;
    border: 1px solid rgba(244, 182, 63, 0.3);
    color: #8a5b00;
  }

  .schedule-mobile-day.is-today .schedule-mobile-day-number,
  .schedule-mobile-day.is-selected .schedule-mobile-day-number {
    background: #ff3b30;
    border-color: #ff3b30;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.24);
    color: white;
  }

  .schedule-mobile-day.is-selected:not(.is-today) .schedule-mobile-day-number {
    background: #172033;
  }

  .schedule-mobile-dots {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    justify-content: center;
    justify-self: center;
    min-height: 26px;
    overflow: hidden;
    padding: 0 1px;
    width: 100%;
  }

  .schedule-mobile-dot {
    background: #edf1f7;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(22, 31, 48, 0.12);
    color: #697488;
    display: block;
    flex: 0 0 auto;
    font-size: 0.56rem;
    font-weight: 950;
    line-height: 1;
    min-height: 18px;
    opacity: 0.92;
    overflow: visible;
    padding: 4px 4px 3px;
    text-align: center;
    white-space: nowrap;
    width: 100%;
  }

  .schedule-mobile-dot.is-in {
    background: color-mix(in srgb, var(--staff-color, var(--blue)) 20%, white);
    border-color: color-mix(in srgb, var(--staff-color, var(--blue)) 36%, white);
    color: color-mix(in srgb, var(--staff-color, var(--blue)) 74%, #111318);
    opacity: 1;
  }

  .schedule-mobile-dot.has-note {
    box-shadow: inset 0 -2px 0 var(--staff-color, var(--blue)), 0 1px 3px rgba(22, 31, 48, 0.12);
  }

  .schedule-mobile-more {
    color: #4d5b70;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
  }

  .schedule-mobile-empty {
    background: #fff1ef;
    border: 1px solid rgba(255, 59, 48, 0.18);
    border-radius: 999px;
    color: #c12a21;
    display: block;
    font-size: 0.54rem;
    font-weight: 950;
    line-height: 1;
    min-height: 18px;
    padding: 4px 4px 3px;
    text-align: center;
    white-space: nowrap;
  }

  .schedule-mobile-rota {
    display: block;
    margin: 0;
    overflow-x: auto;
    padding: 0 12px 24px;
    scroll-padding: 120px 12px 24px 84px;
    -webkit-overflow-scrolling: touch;
  }

  .schedule-mobile-rota::-webkit-scrollbar {
    display: none;
  }

  .schedule-mobile-rota-table {
    background: rgba(204, 220, 239, 0.92);
    border: 1px solid rgba(176, 196, 221, 0.9);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 82px repeat(var(--staff-count), minmax(92px, 1fr));
    min-width: calc(82px + (var(--staff-count) * 92px));
    overflow: clip;
  }

  .mobile-rota-corner,
  .mobile-rota-person {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(184, 201, 224, 0.92);
    min-height: 42px;
    position: sticky;
    top: 110px;
    z-index: 16;
  }

  .mobile-rota-corner {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 0.72rem;
    font-weight: 950;
    justify-content: center;
    left: 0;
    text-transform: uppercase;
    z-index: 20;
  }

  .mobile-rota-person {
    align-items: center;
    color: color-mix(in srgb, var(--staff-color, var(--blue)) 70%, var(--text));
    display: flex;
    font-size: 0.78rem;
    font-weight: 950;
    justify-content: center;
    line-height: 1.05;
    padding: 6px;
    text-align: center;
  }

  .mobile-rota-date,
  .mobile-rota-cell {
    border-radius: 0;
    box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.74);
    min-height: 56px;
  }

  .mobile-rota-date {
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    display: grid;
    gap: 2px;
    justify-items: center;
    left: 0;
    padding: 6px 4px;
    position: sticky;
    z-index: 8;
  }

  .mobile-rota-date span {
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .mobile-rota-date strong {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.14rem;
    font-weight: 950;
    height: 31px;
    justify-content: center;
    min-width: 31px;
  }

  .mobile-rota-date.is-today strong {
    background: #ff3b30;
    color: white;
  }

  .mobile-rota-date.has-no-ops {
    background: #fff1ef;
    box-shadow: inset 4px 0 0 var(--red), inset -1px -1px 0 rgba(255, 255, 255, 0.74);
  }

  .mobile-rota-date.has-coverage-warning {
    background: #fff7dd;
    box-shadow: inset 4px 0 0 #d99512, inset -1px -1px 0 rgba(255, 255, 255, 0.74);
  }

  .mobile-rota-date.has-no-ops strong {
    color: var(--red);
  }

  .mobile-rota-date.is-today.has-no-ops strong {
    color: white;
  }

  .mobile-rota-warning {
    border-radius: 999px;
    font-size: 0.48rem;
    font-weight: 950;
    line-height: 1;
    padding: 3px 5px;
    white-space: nowrap;
  }

  .mobile-rota-warning.is-danger {
    background: var(--red);
    color: white;
  }

  .mobile-rota-warning.is-warning {
    background: #ffedb2;
    color: #755000;
  }

  .mobile-rota-cell {
    background: #edf3fa;
    color: #738096;
    display: grid;
    gap: 2px;
    justify-items: center;
    padding: 7px 5px;
    text-align: center;
  }

  .mobile-rota-cell.is-in {
    background: color-mix(in srgb, var(--staff-color, var(--blue)) 18%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--staff-color, var(--blue)) 32%, white), inset -1px -1px 0 rgba(255, 255, 255, 0.72);
    color: color-mix(in srgb, var(--staff-color, var(--blue)) 70%, var(--text));
  }

  .mobile-rota-cell.has-no-ops {
    background: #fff5f3;
  }

  .mobile-rota-cell.has-coverage-warning {
    background: #fff9e8;
  }

  .mobile-rota-cell strong {
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1.05;
  }

  .mobile-rota-cell span {
    background: rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
    padding: 3px 6px;
  }

  .mobile-rota-cell.is-out {
    font-size: 1.1rem;
    font-weight: 900;
  }

  .entry-dots {
    align-items: center;
    display: flex;
    gap: 3px;
    justify-content: center;
    min-height: 9px;
    overflow: hidden;
  }

  .day-cell.has-no-ops .entry-dots::before {
    background: var(--red);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 6px;
    width: 18px;
  }

  .entry-dot {
    height: 6px;
    width: 6px;
  }

  .entry-dot.is-long {
    width: 21px;
  }

  .mobile-day-agenda {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(27, 36, 52, 0.08);
    display: grid;
    gap: 8px;
    margin: 10px 12px 0;
    max-height: none;
    overflow: visible;
    padding: 11px 12px 12px;
    position: static;
    z-index: auto;
  }

  .schedule-mobile-month .mobile-day-agenda {
    margin-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-agenda-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }

  .mobile-agenda-header h3 {
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
  }

  .mobile-agenda-meta {
    color: var(--muted);
    display: block;
    font-size: 0.74rem;
    font-weight: 780;
    margin-top: 2px;
  }

  .mobile-agenda-header .add-day {
    background: #f4f6fa;
    border-radius: 999px;
    color: #111318;
    min-height: 34px;
    padding: 0 12px;
  }

  .mobile-day-agenda .entry-list {
    margin-top: 0;
  }

  .mobile-day-agenda .no-ops {
    border-radius: 10px;
    font-size: 0.8rem;
    margin-top: 0;
    padding: 7px 9px;
  }

  .coverage-warning {
    border-radius: 10px;
    font-size: 0.78rem;
    margin-top: 0;
    padding: 7px 9px;
  }

  .entry {
    background: color-mix(in srgb, var(--entry-color, var(--blue)) 12%, white);
    border-color: color-mix(in srgb, var(--entry-color, var(--blue)) 28%, white);
    border-left-width: 4px;
    border-radius: 10px;
    gap: 2px;
    min-height: 48px;
    padding: 8px 10px;
  }

  .entry strong {
    font-size: 0.92rem;
  }

  .entry span {
    font-size: 0.84rem;
  }

  .week-list {
    display: none;
  }

  .staff-rota-board {
    border-radius: 14px;
    margin: 0 -2px;
  }

  .staff-rota-grid {
    grid-template-columns: 92px repeat(var(--staff-count), minmax(128px, 1fr));
    min-width: calc(92px + (var(--staff-count) * 128px));
  }

  .staff-rota-corner,
  .staff-rota-person {
    min-height: 48px;
  }

  .staff-rota-corner {
    font-size: 0.7rem;
    padding: 8px;
  }

  .staff-rota-person {
    padding: 7px 8px;
  }

  .staff-rota-person strong {
    font-size: 0.82rem;
  }

  .staff-rota-person span,
  .staff-rota-date span,
  .staff-rota-entry span,
  .staff-rota-entry small {
    font-size: 0.7rem;
  }

  .staff-rota-date,
  .staff-rota-cell {
    min-height: 78px;
    padding: 7px;
  }

  .staff-rota-date strong {
    font-size: 0.78rem;
  }

  .staff-rota-date .add-day {
    min-height: 30px;
    padding: 0 8px;
  }

  .staff-rota-entry,
  .staff-rota-empty {
    min-height: 48px;
    padding: 7px;
  }

  .staff-rota-entry strong {
    font-size: 0.78rem;
  }

  .mobile-week-view {
    display: grid;
  }

  .mobile-week-strip {
    background: white;
    border-bottom: 1px solid #e8eaee;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 1px 6px 8px;
  }

  .mobile-week-day {
    background: transparent;
    border-radius: 16px;
    color: var(--text);
    display: grid;
    gap: 3px;
    justify-items: center;
    min-height: 58px;
    padding: 4px 2px;
  }

  .mobile-week-label {
    color: #8b8f98;
    font-size: 0.68rem;
    font-weight: 850;
  }

  .mobile-week-number {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.22rem;
    font-weight: 850;
    height: 34px;
    justify-content: center;
    min-width: 34px;
  }

  .mobile-week-day.is-selected:not(.is-today) .mobile-week-number {
    background: #e9eaee;
  }

  .mobile-week-day.has-no-ops.is-selected:not(.is-today) .mobile-week-number {
    background: #ffd8d3;
  }

  .mobile-week-day.has-coverage-warning.is-selected:not(.is-today) .mobile-week-number {
    background: #fff0bd;
    color: #6d4b00;
  }

  .mobile-week-day.is-muted {
    color: #8b8f98;
  }

  #entryModal.modal-backdrop,
  #taskModal.modal-backdrop {
    align-items: flex-end;
    padding: max(10px, env(safe-area-inset-top)) 0 0;
  }

  #entryModal .modal,
  #taskModal .modal {
    border-radius: 22px 22px 0 0;
    max-height: calc(100vh - max(10px, env(safe-area-inset-top)));
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
    max-width: none;
    overflow: hidden;
    padding: 0;
    width: 100%;
  }

  #entryForm,
  #taskForm {
    display: grid;
    gap: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: inherit;
  }

  #entryModal .modal-header,
  #taskModal .modal-header {
    border-bottom: 1px solid #eef0f4;
    margin: 0;
    padding: 14px 16px 12px;
  }

  #entryModal .modal-header h2,
  #taskModal .modal-header h2 {
    font-size: 1.18rem;
    line-height: 1.1;
  }

  #entryModal .modal-header .icon-button,
  #taskModal .modal-header .icon-button {
    box-shadow: none;
    min-height: 36px;
    min-width: 36px;
  }

  #entryModal .modal-body,
  #taskModal .modal-body {
    gap: 10px;
    overflow: auto;
    padding: 12px 16px 14px;
    -webkit-overflow-scrolling: touch;
  }

  #entryModal label,
  #taskModal label {
    font-size: 0.82rem;
    gap: 5px;
  }

  #entryModal input,
  #entryModal select,
  #entryModal textarea,
  #taskModal input,
  #taskModal select,
  #taskModal textarea {
    border-radius: 12px;
    font-size: 16px;
    font-weight: 750;
    min-height: 40px;
    padding: 8px 11px;
  }

  #entryModal textarea,
  #taskModal textarea {
    min-height: 72px;
    resize: none;
  }

  #entryModal .form-grid,
  #taskModal .form-grid {
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #entryModal .form-grid label:first-child,
  #taskModal .form-grid label:first-child {
    grid-column: 1 / -1;
  }

  #entryModal .entry-history {
    border-radius: 12px;
    gap: 0;
    overflow: hidden;
    padding: 0;
  }

  #entryModal .entry-history-toggle {
    min-height: 44px;
    padding: 0 12px;
  }

  #entryModal .entry-history-list {
    border-top: 1px solid var(--line);
    gap: 8px;
    padding: 10px;
  }

  #entryModal .history-item {
    padding: 8px 9px;
  }

  #entryModal .history-item span,
  #entryModal .history-item time {
    font-size: 0.76rem;
  }

  #entryModal .modal-actions,
  #taskModal .modal-actions {
    background: white;
    border-top: 1px solid #eef0f4;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }

  #entryModal .modal-actions button,
  #taskModal .modal-actions button {
    border-radius: 12px;
    min-height: 42px;
  }

  #entryModal .modal-actions .spacer,
  #taskModal .modal-actions .spacer {
    display: none;
  }

  #entryModal #cancelButton,
  #taskModal #cancelTaskButton {
    order: 1;
  }

  #entryModal .modal-actions button[type="submit"],
  #taskModal .modal-actions button[type="submit"] {
    order: 2;
  }

  #entryModal #deleteButton,
  #taskModal #deleteTaskButton {
    grid-column: 1 / -1;
    min-height: 38px;
    order: 3;
  }

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

  .settings-overview,
  .settings-page-layout {
    grid-template-columns: 1fr;
  }

  .settings-mini-card {
    min-height: 64px;
    padding: 12px;
  }

  .settings-page-section {
    border-radius: 14px;
    padding: 12px;
  }

  .today-quick-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .today-quick-actions::-webkit-scrollbar {
    display: none;
  }

  .notice-settings-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .display-header {
    align-items: start;
    display: grid;
  }

  .settings-card-actions {
    align-items: stretch;
  }

  .user-form,
  .staff-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .user-row-fields,
  .user-row-meta {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

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

  .staff-order-controls {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-order-button {
    width: 100%;
  }

  .staff-row-main {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .staff-profile-summary {
    grid-column: 2;
    white-space: normal;
  }

  .preset-form,
  .preset-row,
  .recurring-task-form,
  .recurring-task-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .cycle-time-row strong {
    padding-bottom: 0;
  }

  .spacer {
    display: none;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body {
    background: white;
    color: #111827;
  }

  .topbar,
  .page-tabs,
  .toolbar,
  .status,
  .search-panel,
  .staff-filter,
  .ops-board,
  .task-board,
  .weekday-row,
  .month-grid,
  .mobile-week-view,
  .mobile-day-agenda,
  .modal-backdrop {
    display: none !important;
  }

  .shell {
    max-width: none;
    padding: 0;
  }

  .print-header {
    border-bottom: 2px solid #111827;
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .print-header p {
    color: #526070;
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
  }

  .print-header h2 {
    font-size: 22pt;
    margin: 0;
  }

  .print-header span {
    color: #526070;
    font-size: 11pt;
    font-weight: 700;
  }

  .daily-print {
    display: none !important;
  }

  body.is-printing-daily .print-header,
  body.is-printing-daily .calendar-root {
    display: none !important;
  }

  body.is-printing-daily .daily-print {
    color: #111827;
    display: grid !important;
    gap: 12px;
  }

  .daily-print-header {
    border-bottom: 2px solid #111827;
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
  }

  .daily-print-header p {
    color: #526070;
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
  }

  .daily-print-header h2 {
    font-size: 24pt;
    line-height: 1.05;
    margin: 0;
  }

  .daily-print-header span {
    color: #526070;
    font-size: 11pt;
    font-weight: 700;
  }

  .daily-print-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .daily-print-stat,
  .daily-print-section {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    break-inside: avoid;
  }

  .daily-print-stat {
    display: grid;
    gap: 2px;
    padding: 8px;
  }

  .daily-print-stat strong {
    font-size: 18pt;
    line-height: 1;
  }

  .daily-print-stat span {
    color: #526070;
    font-size: 9pt;
    font-weight: 700;
  }

  .daily-print-section {
    display: grid;
    gap: 7px;
    padding: 9px;
  }

  .daily-print-section.is-wide {
    grid-column: 1 / -1;
  }

  .daily-print-section h3 {
    border-bottom: 1px solid #e5e7eb;
    font-size: 13pt;
    margin: 0;
    padding-bottom: 5px;
  }

  .daily-print-list {
    display: grid;
    gap: 5px;
  }

  .daily-print-row {
    border: 1px solid #e5e7eb;
    border-left: 4px solid #64748b;
    border-radius: 5px;
    display: grid;
    gap: 2px;
    padding: 6px 7px;
  }

  .daily-print-row.is-warning {
    background: #fffaf0;
    border-color: #e9c76f;
    border-left-color: #a5630a;
  }

  .daily-print-row.is-danger {
    background: #fff7f5;
    border-color: #efb4ad;
    border-left-color: #b42318;
  }

  .daily-print-row strong {
    font-size: 10pt;
  }

  .daily-print-row span,
  .daily-print-empty {
    color: #526070;
    font-size: 9pt;
    font-weight: 650;
  }

  .calendar-root {
    min-height: 0;
  }

  .week-list {
    display: grid !important;
    gap: 7px;
  }

  .day-list-day {
    break-inside: avoid;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px;
  }

  .day-list-day.has-no-ops {
    background: #fff7f5;
    border-color: #efb4ad;
  }

  .day-list-day.has-coverage-warning {
    background: #fffaf0;
    border-color: #e9c76f;
  }

  .day-list-header {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  .day-number {
    background: #111827;
    color: white;
    height: 24px;
    min-width: 24px;
  }

  .add-day {
    display: none;
  }

  .entry-list {
    gap: 5px;
    margin-top: 0;
  }

  .entry {
    background: white !important;
    border-color: #cbd5e1;
    border-radius: 5px;
    padding: 6px 8px;
  }

  .entry strong {
    font-size: 10pt;
  }

  .entry span,
  .entry small,
  .empty-day,
  .no-ops,
  .coverage-warning {
    font-size: 9pt;
  }
}
