:root {
  color-scheme: light;
  --ink: #1b1d21;
  --muted: #68707d;
  --line: #d9dee8;
  --soft: #f4f6f9;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --accent: #116b68;
  --accent-dark: #0d4f4d;
  --danger: #b33a36;
  --warn: #9a6500;
  --good: #20724b;
  --shadow: 0 18px 60px rgba(28, 35, 48, 0.16);
  --radius: 14px;
  --radius-lg: 22px;
  --control-1: #f2dcd9;
  --control-2: #d9eee8;
  --control-3: #f3ead0;
  --control-4: #e5e1f2;
  --control-5: #dce8f4;
  --control-6: #116b68;
  --control-ink: #26313b;
  --control-accent-ink: #ffffff;
  --dropdown-control-bg: rgb(255 255 255 / 0.94);
  --dropdown-border: rgb(120 128 144 / 0.34);
  --dropdown-shadow: 0 18px 46px rgb(28 35 48 / 0.18), inset 0 1px 0 rgb(255 255 255 / 0.52);
  --liquid-glass-alpha: 0.42;
  --dark-mode-gradient: radial-gradient(circle at 48% 18%, #ff5bd6 0%, #b72d8a 34%, #5a1a5f 62%, #18091f 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

body[data-theme="minimalism"] {
  --accent: #111827;
  --accent-dark: #000000;
  --soft: #f5f5f3;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --line: #deded8;
  --control-1: #eeeeeb;
  --control-2: #e3e6e8;
  --control-3: #f2efe6;
  --control-4: #e7ecea;
  --control-5: #dde4ea;
  --control-6: #111827;
  background: #f7f7f4;
}

body[data-theme="swiss"] {
  --accent: #e42313;
  --accent-dark: #b91c12;
  --soft: #f2f2f2;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #151515;
  --shadow: 8px 8px 0 rgba(0, 0, 0, 0.12);
  --control-1: #ffd329;
  --control-2: #56b4e9;
  --control-3: #ffffff;
  --control-4: #e42313;
  --control-5: #7bdcb5;
  --control-6: #111111;
  background: linear-gradient(90deg, rgba(228, 35, 19, 0.08) 0 18%, #f6f6f2 18% 100%);
}

body[data-theme="flat"] {
  --accent: #006d77;
  --accent-dark: #00545c;
  --soft: #edf6f9;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #b8d8dd;
  --shadow: none;
  --control-1: #ffddd2;
  --control-2: #b8e0d2;
  --control-3: #ffe5a5;
  --control-4: #cddafd;
  --control-5: #d8e2dc;
  --control-6: #006d77;
  background: #edf6f9;
}

body[data-theme="glass"] {
  --accent: #235789;
  --accent-dark: #153a5c;
  --soft: rgba(255, 255, 255, 0.46);
  --panel: rgba(255, 255, 255, 0.5);
  --panel-solid: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.58);
  --shadow: 0 24px 80px rgba(35, 87, 137, 0.18);
  --control-1: rgba(255, 173, 162, 0.72);
  --control-2: rgba(118, 214, 203, 0.72);
  --control-3: rgba(255, 232, 171, 0.72);
  --control-4: rgba(179, 193, 255, 0.72);
  --control-5: rgba(162, 210, 255, 0.72);
  --control-6: #235789;
  background: linear-gradient(135deg, #dcecff 0%, #f7f1ff 46%, #e9fff6 100%);
}

body[data-theme="liquid"] {
  --accent: #0f8f88;
  --accent-dark: #0a6965;
  --soft: rgb(255 255 255 / calc(var(--liquid-glass-alpha) + 0.06));
  --panel: rgb(255 255 255 / var(--liquid-glass-alpha));
  --panel-solid: rgb(255 255 255 / calc(var(--liquid-glass-alpha) + 0.1));
  --line: rgb(255 255 255 / calc(var(--liquid-glass-alpha) + 0.12));
  --shadow: 0 24px 70px rgb(28 35 48 / 0.18), inset 0 1px 0 rgb(255 255 255 / 0.52);
  --control-1: rgb(255 194 214 / calc(var(--liquid-glass-alpha) + 0.1));
  --control-2: rgb(158 238 216 / calc(var(--liquid-glass-alpha) + 0.1));
  --control-3: rgb(255 232 151 / calc(var(--liquid-glass-alpha) + 0.1));
  --control-4: rgb(183 198 255 / calc(var(--liquid-glass-alpha) + 0.1));
  --control-5: rgb(150 219 255 / calc(var(--liquid-glass-alpha) + 0.1));
  --control-6: rgb(15 143 136 / calc(var(--liquid-glass-alpha) + 0.08));
  background: radial-gradient(circle at 48% 16%, #ff8be3 0%, #c747a0 36%, #6b256e 66%, #24102f 100%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2f3 0%, #f8f5ef 42%, #edf4f2 100%);
  color: var(--ink);
}

body.native-app {
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body.native-app .auth-screen {
  min-height: 100dvh;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-right: max(28px, env(safe-area-inset-right));
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  padding-left: max(28px, env(safe-area-inset-left));
}

body.native-app button,
body.native-app input,
body.native-app select,
body.native-app textarea {
  font-size: max(16px, 1em);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #eef3f2;
}

.auth-shell {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid #d9e1e2;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 80px rgba(31, 46, 55, 0.16);
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(17, 107, 104, 0.2);
}

.auth-heading {
  margin-top: 18px;
}

.auth-heading h1 {
  margin-top: 4px;
  font-size: 30px;
}

.auth-heading > p:last-child {
  margin-top: 6px;
  color: #68707d;
}

.auth-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 22px;
  padding: 4px;
  border-radius: 14px;
  background: #edf1f2;
}

.auth-modes button {
  height: 38px;
  border-radius: 10px;
  background: transparent;
  color: #55606d;
  font-weight: 750;
}

.auth-modes button.active {
  background: white;
  color: #1b1d21;
  box-shadow: 0 3px 12px rgba(28, 35, 48, 0.1);
}

.auth-form {
  margin-top: 14px;
}

.auth-submit {
  width: 100%;
  margin-top: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
  color: #7a8490;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dce2e5;
}

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

.provider-button {
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #d8dfe3;
  border-radius: 12px;
  background: white;
  color: #27313d;
  font-size: 12px;
  font-weight: 750;
}

.provider-button b {
  margin-right: 4px;
  color: var(--accent);
  font-size: 15px;
}

.provider-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.auth-message {
  min-height: 18px;
  margin-top: 14px;
  color: #b33a36;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.auth-message.success {
  color: #20724b;
}

.app-shell[hidden] {
  display: none;
}

body.viewer-only #editBtn,
body.viewer-only #shareBtn,
body.viewer-only .nav-button:not([data-view="planner"]),
body.view-only #addOpenShiftBtn,
body.view-only #addPersonBtn,
body.view-only #addTimeOffBtn,
body.view-only #publishBtn,
body.view-only #excelImportBtn,
body.view-only .person-actions,
body.view-only #saveShiftBtn,
body.view-only #saveHolidayFromShiftBtn,
body.view-only #deleteShiftBtn,
body.view-only #savePersonBtn,
body.view-only #deletePersonBtn,
body.view-only #saveTimeOffBtn,
body.view-only #deleteTimeOffBtn {
  display: none !important;
}

body.view-only .shift-card,
body.view-only .open-shift-card {
  cursor: default;
}

body.published-preview #viewRotaBtn {
  background: var(--control-2);
}

body.published-preview #undoBtn,
body.published-preview #redoBtn,
body.published-preview #autoFillBtn,
body.published-preview #copyWeekBtn,
body.published-preview #copyShiftsBtn,
body.published-preview #moveStaffLocationBtn,
body.published-preview #clearWeekBtn {
  display: none !important;
}

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

body[data-font="rounded"] {
  font-family: "SF Pro Rounded", "Arial Rounded MT", -apple-system, BlinkMacSystemFont, sans-serif;
}

body[data-font="modern"] {
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, sans-serif;
}

body[data-font="mono"] {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

body.hide-shift-roles .role-field,
body.hide-shift-comments .shift-comment,
body.hide-shift-comments .open-shift-comment,
body.hide-shift-comments .daily-comment {
  display: none;
}

.print-only {
  display: none;
}

.print-summary {
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.print-summary > div {
  min-width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.print-summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

#printNotesText {
  flex: 1;
  color: var(--muted);
}

#printNotesText:empty {
  display: none;
}

body[data-appearance="dark"] {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #f3c7e5;
  --line: rgb(255 170 225 / 0.32);
  --soft: rgb(63 19 66 / 0.62);
  --panel: rgb(34 10 39 / 0.66);
  --panel-solid: rgb(45 14 51 / 0.82);
  --accent: #ff7ad9;
  --accent-dark: #b967ff;
  --danger: #ff5d93;
  --warn: #ffd6a5;
  --good: #8ff5d2;
  --control-1: rgb(255 122 217 / 0.74);
  --control-2: rgb(192 132 252 / 0.72);
  --control-3: rgb(255 214 165 / 0.78);
  --control-4: rgb(137 180 255 / 0.72);
  --control-5: rgb(115 230 205 / 0.7);
  --control-6: #ff7ad9;
  --control-ink: #ffffff;
  --control-accent-ink: #241027;
  --dropdown-control-bg: rgb(45 14 51 / 0.94);
  --dropdown-border: rgb(255 170 225 / 0.38);
  --dropdown-shadow: 0 22px 56px rgb(255 122 217 / 0.16), 0 10px 34px rgb(137 180 255 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.14);
  --shadow: 0 22px 64px rgb(255 122 217 / 0.14), 0 12px 38px rgb(137 180 255 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.11);
  background: var(--dark-mode-gradient);
  background-attachment: fixed;
}

body[data-appearance="dark"] .auth-screen {
  background: var(--dark-mode-gradient);
  background-attachment: fixed;
}

body[data-appearance="dark"] .sidebar,
body[data-appearance="dark"] .topbar,
body[data-appearance="dark"] .grid-head,
body[data-appearance="dark"] .person-head,
body[data-appearance="dark"] .person-row-label,
body[data-appearance="dark"] dialog,
body[data-appearance="dark"] .dialog-body { background: var(--panel); color: var(--ink); }
body[data-appearance="dark"] input,
body[data-appearance="dark"] select,
body[data-appearance="dark"] textarea,
body[data-appearance="dark"] .day-pill { background: rgb(31 9 36 / 0.88); color: var(--ink); border-color: var(--line); }
body[data-appearance="dark"] label,
body[data-appearance="dark"] .role-chip,
body[data-appearance="dark"] .location-chip,
body[data-appearance="dark"] .shift-location,
body[data-appearance="dark"] .shift-note,
body[data-appearance="dark"] .shift-comment,
body[data-appearance="dark"] .open-shift-comment,
body[data-appearance="dark"] .daily-comment { color: #d9e4ee; }
body[data-appearance="dark"] .shift-card.empty { background: rgb(45 14 51 / 0.66); border-color: rgb(255 170 225 / 0.32); }
body[data-appearance="dark"] .unavailable { background: repeating-linear-gradient(135deg, rgb(49 16 53 / 0.72), rgb(49 16 53 / 0.72) 8px, rgb(70 22 65 / 0.72) 8px, rgb(70 22 65 / 0.72) 16px); }
body[data-appearance="dark"] .primary-button {
  background: linear-gradient(135deg, #ff7ad9, #b967ff);
  color: #241027;
  box-shadow: 0 16px 38px rgb(255 122 217 / 0.22), 0 12px 34px rgb(185 103 255 / 0.16);
}
body[data-appearance="dark"] .nav-button.active,
body[data-appearance="dark"] .nav-button:hover,
body[data-appearance="dark"] .hours-pill,
body[data-appearance="dark"] .report-summary-card,
body[data-appearance="dark"] .report-panel,
body[data-appearance="dark"] .dashboard-card,
body[data-appearance="dark"] .manage-card,
body[data-appearance="dark"] .about-card,
body[data-appearance="dark"] .location-hour-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  body[data-appearance="system"] {
    color-scheme: dark;
    --ink: #ffffff; --muted: #f3c7e5; --line: rgb(255 170 225 / 0.32); --soft: rgb(63 19 66 / 0.62);
    --panel: rgb(34 10 39 / 0.66); --panel-solid: rgb(45 14 51 / 0.82); --accent: #ff7ad9; --accent-dark: #b967ff;
    --danger: #ff5d93; --warn: #ffd6a5; --good: #8ff5d2;
    --control-1: rgb(255 122 217 / 0.74); --control-2: rgb(192 132 252 / 0.72); --control-3: rgb(255 214 165 / 0.78);
    --control-4: rgb(137 180 255 / 0.72); --control-5: rgb(115 230 205 / 0.7); --control-6: #ff7ad9;
    --control-ink: #ffffff; --control-accent-ink: #241027;
    --dropdown-control-bg: rgb(45 14 51 / 0.94);
    --dropdown-border: rgb(255 170 225 / 0.38);
    --dropdown-shadow: 0 22px 56px rgb(255 122 217 / 0.16), 0 10px 34px rgb(137 180 255 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.14);
    --shadow: 0 22px 64px rgb(255 122 217 / 0.14), 0 12px 38px rgb(137 180 255 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.11);
    background: var(--dark-mode-gradient);
    background-attachment: fixed;
  }

  body[data-appearance="system"] .auth-screen {
    background: var(--dark-mode-gradient);
    background-attachment: fixed;
  }
}

body[data-bg="solid"],
body[data-bg="gradient"],
body[data-bg="photo"],
body[data-appearance="dark"][data-bg="solid"],
body[data-appearance="dark"][data-bg="gradient"],
body[data-appearance="dark"][data-bg="photo"] {
  background: var(--custom-app-background) !important;
  background-attachment: fixed !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

body[data-bg="solid"] .auth-screen,
body[data-bg="gradient"] .auth-screen,
body[data-bg="photo"] .auth-screen {
  background: transparent !important;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  padding: 18px 18px 22px;
  border-right: 1px solid rgba(120, 128, 144, 0.28);
  background: rgba(246, 248, 250, 0.72);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sidebar-collapse {
  flex: 0 0 38px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 8px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(17, 107, 104, 0.2);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 19px;
}

.brand p,
.summary-panel p,
.eyebrow,
.save-state {
  color: var(--muted);
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-button {
  min-height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: transparent;
  color: #3c4653;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 22px rgba(34, 43, 56, 0.08);
}

.icon {
  width: 22px;
  color: var(--accent);
}

@media (min-width: 981px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar-collapsed .sidebar {
    padding-inline: 13px;
  }

  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .summary-panel,
  .sidebar-collapsed .mini-list,
  .sidebar-collapsed .ongoing-panel {
    display: none;
  }

  .sidebar-collapsed .sidebar-top,
  .sidebar-collapsed .brand,
  .sidebar-collapsed .nav-button {
    justify-content: center;
  }

  .sidebar-collapsed .brand {
    padding-inline: 0;
  }

  .sidebar-collapsed .nav-button {
    padding-inline: 0;
  }

  .sidebar-collapsed .nav-button .icon {
    width: auto;
  }
}

.summary-panel,
.mini-list,
.rules-panel,
.dashboard-card,
.manage-card,
.about-card,
.settings-grid section {
  border: 1px solid rgba(128, 137, 151, 0.22);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}

.summary-panel {
  padding: 15px;
}

.ongoing-panel {
  padding: 12px;
  border: 1px solid rgba(128, 137, 151, 0.22);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

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

.ongoing-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.ongoing-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.ongoing-item {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink);
  text-align: left;
}

.ongoing-item strong,
.ongoing-item span {
  display: block;
}

.ongoing-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.panel-label,
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.summary-panel strong {
  display: block;
  font-size: 34px;
  margin-top: 2px;
}

.mini-list {
  padding: 12px;
  min-height: 150px;
}

.section-title,
.section-heading,
.topbar,
.notice-row,
.template-item,
.person-card,
.rule-row,
.week-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-list,
.people-list,
.dashboard-lines {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.manage-tabs {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 4px;
  width: min(560px, 100%);
  margin: 12px 0 18px;
  padding: 4px;
  border: 1px solid rgba(128, 137, 151, 0.2);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,0.65) inset;
}

.manage-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.manage-tab.active,
.manage-tab:hover {
  background: var(--control-6);
  color: var(--control-accent-ink);
  box-shadow: 0 10px 24px rgb(28 35 48 / 0.12);
}

.manage-panel {
  display: none;
}

.manage-panel.active {
  display: block;
}

.manage-card {
  padding: 18px;
}

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

.template-item {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.template-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

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

.toolbar select {
  width: auto;
  min-width: 150px;
}

.topbar {
  position: relative;
  z-index: 80;
  min-height: 68px;
  margin-bottom: 16px;
  overflow: visible;
}

h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

.week-workplace,
.week-range {
  display: block;
}

.week-range {
  margin-top: 3px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.toolbar {
  position: relative;
  z-index: 81;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  overflow: visible;
}

.toolbar input,
.toolbar select,
.toolbar button {
  height: 38px;
  min-height: 38px;
}

.week-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

#weekPicker {
  width: 10.5rem;
  flex: 0 0 10.5rem;
}

.location-control {
  position: relative;
  height: 38px;
}

.location-control::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--control-ink);
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-58%);
}

#locationFilter {
  min-width: 10rem;
  height: 38px;
  padding: 0 34px 0 14px;
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
}

#prevWeekBtn { background: var(--control-1); color: var(--control-ink); }
#nextWeekBtn { background: var(--control-2); color: var(--control-ink); }
#weekPicker { background: var(--control-3); color: var(--control-ink); }
#locationFilter { background: var(--control-4); color: var(--control-ink); }
#editBtn { background: var(--control-5); color: var(--control-ink); border-color: transparent; }
#shareBtn { background: var(--control-6); color: var(--control-accent-ink); }

input[type="date"],
#calendarPerson,
#locationFilter,
#shiftLocation,
#calendarLocation,
#moveLocationTarget,
.permanent-location {
  height: 38px;
  min-height: 38px;
  border-color: transparent;
  color: var(--control-ink);
  box-shadow: none;
  backdrop-filter: none;
  font-weight: 500;
  cursor: pointer;
}

#calendarDialog select {
  padding: 0 34px 0 14px;
}

input[type="date"],
#calendarPerson {
  background: var(--control-3);
}

#locationFilter,
#shiftLocation,
#calendarLocation,
#moveLocationTarget,
.permanent-location {
  background: var(--control-4);
}

input[type="date"]:hover,
#calendarPerson:hover,
#locationFilter:hover,
#shiftLocation:hover,
#calendarLocation:hover,
#moveLocationTarget:hover,
.permanent-location:hover {
  filter: brightness(0.94) saturate(1.06);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

body[data-appearance="dark"] input[type="date"],
body[data-appearance="dark"] #calendarPerson {
  color: #020304;
}

#prevWeekBtn:hover,
#nextWeekBtn:hover,
#editBtn:hover,
#shareBtn:hover {
  filter: brightness(0.94) saturate(1.06);
}

.share-menu {
  position: relative;
  z-index: 82;
}

.profile-menu {
  position: relative;
  z-index: 82;
}

.profile-menu .share-panel {
  width: 220px;
}

.profile-menu .share-panel select {
  margin-bottom: 7px;
}

.account-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 150px;
  padding: 0 11px 0 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 500;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 850;
}

#accountProfileName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.share-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

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

.share-panel button {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.share-panel button:hover {
  filter: brightness(0.94) saturate(1.05);
}

.share-panel button:nth-child(1) { background: var(--control-1); }
.share-panel button:nth-child(2) { background: var(--control-2); }
.share-panel button:nth-child(3) { background: var(--control-3); }
.share-panel button:nth-child(4) { background: var(--control-4); }
.share-panel button:nth-child(5) { background: var(--control-5); }
.share-panel button:nth-child(6) { background: var(--control-6); color: var(--control-accent-ink); }
.share-panel button:nth-child(7) { background: var(--control-2); }
.share-panel button + button { margin-top: 5px; }

.share-panel .menu-danger {
  color: var(--danger);
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  height: 38px;
  min-height: 38px;
  border-radius: var(--radius);
  padding: 0 13px;
  border: 1px solid transparent;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--panel-solid);
  border-color: var(--line);
  font-size: 21px;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: var(--panel-solid);
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: #fff6f5;
  color: var(--danger);
  border-color: #f0cbc8;
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 38px;
  padding: 0 34px 0 14px;
  border-color: var(--dropdown-border);
  background-color: var(--dropdown-control-bg);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  box-shadow: var(--dropdown-shadow);
  cursor: pointer;
}

select:hover {
  filter: brightness(0.98) saturate(1.05);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 107, 104, 0.14);
}

select option,
select optgroup {
  background: var(--dropdown-control-bg);
  color: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
  position: relative;
  z-index: 1;
}

.notice-row {
  margin-bottom: 12px;
}

.notice {
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.notice.good {
  color: var(--good);
  border-color: rgba(32, 114, 75, 0.2);
}

.notice.warn {
  color: var(--warn);
  border-color: rgba(154, 101, 0, 0.24);
}

.open-shift-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.open-shift-panel.drop-target {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
  background: var(--soft);
}

.open-shift-list {
  display: flex;
  gap: 10px;
  margin-top: 11px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.open-shift-card {
  flex: 0 0 220px;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid rgba(45, 55, 68, 0.14);
  border-radius: 16px;
  color: #27313d;
  text-align: left;
  transition: opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.open-shift-card[draggable="true"] {
  cursor: grab;
}

.open-shift-card strong,
.open-shift-card span {
  display: block;
}

.open-shift-card span {
  margin-top: 5px;
  font-size: 12px;
}

.rota-grid {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 184px repeat(7, minmax(166px, 1fr));
  gap: 7px;
  min-height: 440px;
  padding: 9px;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rota-row {
  display: contents;
}

.grid-cell {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.grid-head:first-of-type {
  border-top-left-radius: var(--radius-lg);
}

.grid-cell:nth-child(8n) {
  border-right: 1px solid var(--line);
}

.grid-head,
.person-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 56px;
  padding: 10px 12px;
  background: rgba(246, 248, 250, 0.94);
  backdrop-filter: blur(12px);
}

.person-head,
.person-row-label {
  position: sticky;
  left: 0;
  z-index: 3;
}

.person-row-label {
  padding: 11px 14px;
  background: rgba(250, 251, 252, 0.96);
}

.person-name {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.person-role {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.hours-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 24px;
  margin-top: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: #414a55;
  font-size: 12px;
  font-weight: 700;
}

.day-name {
  font-weight: 800;
}

.day-date {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.shift-cell {
  display: grid;
  align-content: start;
  padding: 8px;
  transition: background 140ms ease, box-shadow 140ms ease, outline-color 140ms ease;
}

.shift-cell.drop-target {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
  background: var(--soft);
}

body.drag-copying .shift-cell.drop-target,
body.drag-copying .open-shift-panel.drop-target {
  outline-style: dashed;
}

.shift-card {
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  padding: 9px 12px;
  text-align: left;
  background: #f8fbfb;
  border: 1px solid rgba(17, 107, 104, 0.22);
  display: grid;
  align-content: start;
  gap: 4px;
  transition: opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.open-shift-card.dragging,
.shift-card.dragging {
  opacity: 0.42;
  transform: scale(0.97);
  cursor: grabbing;
}

.shift-card[draggable="true"] {
  cursor: grab;
}

.shift-card[draggable="true"].dragging {
  cursor: grabbing;
}

body.dragging-open .shift-cell {
  box-shadow: inset 0 0 0 1px rgba(17, 107, 104, 0.16);
}

body.dragging-assigned .open-shift-panel {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.shift-card.empty {
  border-style: dashed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
}

.shift-card.shift-card-plain,
.open-shift-card.open-shift-card-plain {
  border-color: var(--line);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: none;
}

.shift-card.holiday-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-style: solid;
  border-color: rgba(17, 107, 104, 0.22);
  background: rgba(216, 240, 231, 0.68);
  color: var(--ink);
  font-weight: 800;
}

.shift-card.day-off-card,
.shift-card.holiday-card {
  justify-self: start;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  aspect-ratio: auto;
  padding: 7px 11px;
  border-radius: 999px;
  align-content: center;
  line-height: 1.1;
}

.shift-card.day-off-card {
  display: inline-flex;
  align-items: center;
  border-style: solid;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.shift-time {
  font-weight: 800;
}

.shift-location,
.shift-note {
  font-size: 12px;
  color: #4d5662;
  overflow-wrap: anywhere;
}

.shift-comment,
.open-shift-comment,
.daily-comment {
  color: #394452;
  font-size: 12px;
  font-style: italic;
  overflow-wrap: anywhere;
}

.shift-comment,
.open-shift-comment {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-comment {
  display: block;
  margin-top: 3px;
}

.unavailable {
  background: repeating-linear-gradient(135deg, #f7f2f0, #f7f2f0 8px, #fff 8px, #fff 16px);
}

.person-card {
  align-items: stretch;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  border: 1px solid var(--line);
}

.person-card button {
  align-self: center;
}

.person-swatch {
  width: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.person-main {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.person-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.person-meta {
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.timeoff-card {
  width: 100%;
  text-align: left;
}

.holiday-plane {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--control-2);
  color: var(--control-ink);
  font-size: 13px;
  font-weight: 850;
  vertical-align: middle;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.rules-panel,
.manage-card,
.about-card,
.settings-grid section {
  padding: 18px;
}

.rule-row {
  margin-top: 16px;
}

.rule-row input {
  max-width: 96px;
}

.check-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.settings-tabs {
  display: inline-grid;
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  gap: 4px;
  width: min(760px, 100%);
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid rgba(128, 137, 151, 0.2);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,0.65) inset;
}

.settings-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.settings-tab.active,
.settings-tab:hover {
  background: var(--control-6);
  color: var(--control-accent-ink);
  box-shadow: 0 10px 24px rgb(28 35 48 / 0.12);
}

.settings-grid {
  display: block;
  max-width: 920px;
}

.settings-grid section {
  padding: 16px;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.range-field {
  margin-top: 16px;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-field strong {
  color: var(--accent);
  font-size: 13px;
}

.background-settings {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.background-controls {
  display: grid;
  gap: 12px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.background-swatch {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.62), 0 8px 18px rgb(28 35 48 / 0.1);
}

.range-field input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--accent);
}

.tutorial-card {
  grid-column: 1 / -1;
  border-color: rgba(17, 107, 104, 0.24);
  background:
    linear-gradient(135deg, rgba(17, 107, 104, 0.08), rgba(255, 255, 255, 0.18)),
    var(--panel);
}

.tutorial-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tutorial-video-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(128, 137, 151, 0.24);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.tutorial-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #edf3f2;
}

.tutorial-video-card strong,
.tutorial-video-card span {
  display: block;
}

.tutorial-video-card strong {
  font-size: 15px;
}

.tutorial-video-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tutorial-actions .primary-button,
.tutorial-actions .secondary-button {
  flex: 1 1 170px;
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  max-width: 980px;
}

.about-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.5;
}

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

.about-hero {
  grid-column: 1 / -1;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.about-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgb(17 107 104 / 0.2);
}

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

.contact-grid a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

#onboardingDialog,
#quickTipsDialog {
  width: min(680px, calc(100vw - 28px));
}

.onboarding-body,
.quick-tip-body {
  gap: 16px;
}

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

.setup-action {
  min-height: 104px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink);
  text-align: left;
}

.setup-action strong,
.setup-action span {
  display: block;
}

.setup-action strong {
  font-size: 15px;
}

.setup-action span,
.quick-tip-text {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.setup-action:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 26px rgb(28 35 48 / 0.1);
}

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

.location-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.location-hour-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.report-summary-card,
.report-panel {
  border: 1px solid rgba(128, 137, 151, 0.22);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}

.report-summary-card {
  min-height: 118px;
  padding: 16px;
}

.report-summary-card span,
.report-summary-card p {
  color: var(--muted);
}

.report-summary-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1;
}

.report-summary-card.good strong { color: var(--good); }
.report-summary-card.warn strong { color: var(--warn); }
.report-summary-card.danger strong { color: var(--danger); }

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

.report-panel {
  min-width: 0;
  padding: 16px;
}

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

.bar-chart,
.ranked-report,
.report-legend {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.bar-row,
.report-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.bar-row span,
.report-row span {
  color: var(--muted);
  font-size: 12px;
}

.bar-row em,
.report-row em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.stacked-bar,
.report-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.stacked-bar i,
.stacked-bar b,
.report-meter span {
  display: block;
  height: 100%;
}

.stacked-bar {
  display: flex;
}

.stacked-bar i {
  background: var(--accent);
}

.stacked-bar b {
  background: var(--control-4);
}

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

.report-row .report-meter {
  grid-column: 1 / -1;
}

.report-row strong {
  display: block;
}

.donut-report {
  display: grid;
  place-items: center;
  min-height: 206px;
}

.donut-ring {
  display: grid;
  place-items: center;
  width: min(190px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgb(255 255 255 / 0.28), var(--shadow);
}

.donut-ring span {
  display: grid;
  place-items: center;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel-solid);
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
}

.report-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.report-legend i {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
}

.location-hour-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.location-hour-card .budget-copy {
  margin-top: 4px;
  font-weight: 700;
}

.location-hour-card.over-budget {
  box-shadow: inset 4px 0 0 var(--danger);
}

.budget-meter {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.budget-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 180ms ease;
}

.dashboard-card {
  padding: 14px;
  min-height: 260px;
}

.dashboard-card.today-card {
  grid-column: span 2;
  min-height: 320px;
  padding: 20px;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--panel-solid);
}

.today-card .dashboard-card-head strong {
  font-size: 32px;
}

.today-label {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: white !important;
  font-size: 11px;
  font-weight: 800;
}

.daily-ongoing {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.daily-ongoing > strong {
  color: var(--accent);
}

.daily-ongoing span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-card-head strong {
  display: block;
  font-size: 24px;
}

.dashboard-card-head span {
  color: var(--muted);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.dashboard-stats span {
  min-height: 42px;
  border-radius: var(--radius);
  background: var(--soft);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}

.dashboard-lines {
  align-content: start;
  min-height: 96px;
}

.dashboard-lines p,
.empty-copy {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.location-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.location-bars span {
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  color: #27313d;
  font-size: 12px;
  font-weight: 750;
}

.location-bars .over-budget-chip {
  color: var(--danger);
  box-shadow: inset 0 0 0 2px var(--danger);
}

.role-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.location-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: #394452;
  font-size: 12px;
  font-weight: 750;
}

.location-chip i,
.location-check i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
}

#personDialog {
  width: min(760px, calc(100vw - 28px));
}

.profile-subsection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.location-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.location-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.location-check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.permanent-shift-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.permanent-shift-row {
  display: grid;
  grid-template-columns: 125px minmax(180px, 1.4fr) minmax(140px, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.permanent-shift-row select {
  min-width: 0;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--soft);
  color: #394452;
  font-size: 12px;
  font-weight: 750;
}

.location-add {
  margin-top: 12px;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #384250;
  font-weight: 650;
}

.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(18, 25, 38, 0.28);
}

dialog::backdrop {
  background: rgba(22, 28, 36, 0.34);
  backdrop-filter: blur(4px);
}

.dialog-body {
  padding: 18px;
}

.dialog-body header,
.dialog-body footer,
.two-cols {
  display: grid;
  gap: 12px;
}

.dialog-body header {
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: start;
}

.dialog-body footer {
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  margin-top: 18px;
}

.dialog-body footer.shift-dialog-actions {
  grid-template-columns: auto 1fr auto auto auto;
}

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

.day-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.day-pill {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
}

body[data-theme="swiss"] .nav-button,
body[data-theme="swiss"] .template-item,
body[data-theme="swiss"] .person-card,
body[data-theme="swiss"] .shift-card,
body[data-theme="swiss"] input,
body[data-theme="swiss"] select,
body[data-theme="swiss"] textarea {
  border-width: 2px;
}

body[data-theme="swiss"] .eyebrow {
  color: var(--accent);
}

body[data-theme="swiss"] #locationFilter {
  color: var(--ink);
}

body[data-theme="swiss"] .location-control::after {
  color: var(--ink);
}

body[data-theme="flat"] .sidebar,
body[data-theme="flat"] .summary-panel,
body[data-theme="flat"] .mini-list,
body[data-theme="flat"] .rules-panel,
body[data-theme="flat"] .dashboard-card,
body[data-theme="flat"] .manage-card,
body[data-theme="flat"] .about-card,
body[data-theme="flat"] .settings-grid section {
  backdrop-filter: none;
}

body[data-theme="glass"] .sidebar,
body[data-theme="glass"] .grid-head,
body[data-theme="glass"] .person-head,
body[data-theme="glass"] .person-row-label,
body[data-theme="glass"] .summary-panel,
body[data-theme="glass"] .mini-list,
body[data-theme="glass"] .rules-panel,
body[data-theme="glass"] .dashboard-card,
body[data-theme="glass"] .manage-card,
body[data-theme="glass"] .about-card,
body[data-theme="glass"] .settings-grid section {
  backdrop-filter: blur(22px);
}

body[data-theme="liquid"] .sidebar,
body[data-theme="liquid"] .topbar,
body[data-theme="liquid"] .summary-panel,
body[data-theme="liquid"] .mini-list,
body[data-theme="liquid"] .ongoing-panel,
body[data-theme="liquid"] .rules-panel,
body[data-theme="liquid"] .dashboard-card,
body[data-theme="liquid"] .manage-card,
body[data-theme="liquid"] .about-card,
body[data-theme="liquid"] .report-summary-card,
body[data-theme="liquid"] .report-panel,
body[data-theme="liquid"] .settings-grid section,
body[data-theme="liquid"] .open-shift-panel,
body[data-theme="liquid"] .rota-grid,
body[data-theme="liquid"] .grid-cell,
body[data-theme="liquid"] .grid-head,
body[data-theme="liquid"] .person-head,
body[data-theme="liquid"] .person-row-label,
body[data-theme="liquid"] .share-panel,
body[data-theme="liquid"] .account-profile-panel,
body[data-theme="liquid"] .edit-panel,
body[data-theme="liquid"] dialog,
body[data-theme="liquid"] .dialog-body {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.45);
}

body[data-theme="liquid"] .grid-cell,
body[data-theme="liquid"] input,
body[data-theme="liquid"] select,
body[data-theme="liquid"] textarea,
body[data-theme="liquid"] .secondary-button,
body[data-theme="liquid"] .icon-button,
body[data-theme="liquid"] .nav-button,
body[data-theme="liquid"] .manage-tabs,
body[data-theme="liquid"] .template-item,
body[data-theme="liquid"] .person-card,
body[data-theme="liquid"] .rule-row,
body[data-theme="liquid"] .location-hour-card,
body[data-theme="liquid"] .donut-ring span,
body[data-theme="liquid"] .tutorial-video-card,
body[data-theme="liquid"] .contact-grid a,
body[data-theme="liquid"] .setup-action,
body[data-theme="liquid"] .ongoing-item {
  background: var(--panel-solid);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.44), 0 12px 32px rgb(31 45 58 / 0.08);
  backdrop-filter: blur(18px) saturate(1.35);
}

body[data-theme="liquid"] input[type="date"],
body[data-theme="liquid"] #calendarPerson {
  background: rgb(255 232 151 / 0.86);
  border-color: rgb(255 255 255 / 0.42);
  color: #26313b;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 12px 30px rgb(31 45 58 / 0.1);
  backdrop-filter: blur(18px) saturate(1.35);
}

body[data-theme="liquid"] #locationFilter,
body[data-theme="liquid"] #shiftLocation,
body[data-theme="liquid"] #calendarLocation,
body[data-theme="liquid"] #moveLocationTarget,
body[data-theme="liquid"] .permanent-location {
  background: rgb(183 198 255 / 0.86);
  border-color: rgb(255 255 255 / 0.42);
  color: #26313b;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 12px 30px rgb(31 45 58 / 0.1);
  backdrop-filter: blur(18px) saturate(1.35);
}

body[data-theme="liquid"] .shift-card,
body[data-theme="liquid"] .open-shift-card {
  border-color: rgb(255 255 255 / 0.5);
  box-shadow: inset 5px 0 0 currentColor, 0 12px 30px rgb(28 35 48 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.42);
  backdrop-filter: blur(18px) saturate(1.32);
}

body[data-theme="liquid"] .shift-card.empty {
  background: rgb(255 255 255 / calc(var(--liquid-glass-alpha) * 0.62));
}

body[data-theme="liquid"] .shift-card.shift-card-plain,
body[data-theme="liquid"] .open-shift-card.open-shift-card-plain {
  background: var(--panel-solid);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.42), 0 12px 30px rgb(28 35 48 / 0.08);
}

body[data-theme="liquid"] .nav-button.active,
body[data-theme="liquid"] .nav-button:hover,
body[data-theme="liquid"] .auth-modes button.active {
  background: rgb(255 255 255 / calc(var(--liquid-glass-alpha) + 0.12));
  box-shadow: 0 12px 34px rgb(31 45 58 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.56);
}

body[data-theme="liquid"] .primary-button {
  background: linear-gradient(135deg, rgb(15 143 136 / 0.86), rgb(87 120 255 / 0.78));
  box-shadow: 0 14px 34px rgb(15 143 136 / 0.24), inset 0 1px 0 rgb(255 255 255 / 0.36);
}

body[data-theme="liquid"] .share-panel button {
  border: 1px solid rgb(255 255 255 / 0.32);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.34);
}

select,
body[data-theme="liquid"] select,
body[data-appearance="dark"] select,
body[data-appearance="system"] select,
#locationFilter,
#shiftLocation,
#calendarPerson,
#calendarLocation,
#moveLocationTarget,
.permanent-location {
  border-color: var(--dropdown-border) !important;
  background-color: var(--dropdown-control-bg) !important;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50% !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  color: var(--ink) !important;
  box-shadow: var(--dropdown-shadow) !important;
  backdrop-filter: blur(20px) saturate(1.18);
}

.location-control::after {
  display: none;
}

body[data-theme="liquid"] .tutorial-card {
  background:
    linear-gradient(135deg, rgb(255 255 255 / calc(var(--liquid-glass-alpha) + 0.08)), rgb(255 255 255 / calc(var(--liquid-glass-alpha) - 0.02))),
    var(--panel);
}

body[data-theme="liquid"] .tutorial-video {
  border-color: rgb(255 255 255 / 0.5);
  box-shadow: 0 16px 36px rgb(28 35 48 / 0.12);
}

body[data-appearance="dark"] .nav-button,
body[data-appearance="dark"] .secondary-button,
body[data-appearance="dark"] .template-item,
body[data-appearance="dark"] .open-shift-panel,
body[data-appearance="dark"] .notice,
body[data-appearance="dark"] .share-panel {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  body[data-appearance="system"] .sidebar,
  body[data-appearance="system"] .topbar,
  body[data-appearance="system"] .grid-head,
  body[data-appearance="system"] .person-head,
  body[data-appearance="system"] .person-row-label,
  body[data-appearance="system"] dialog,
  body[data-appearance="system"] .dialog-body { background: var(--panel); color: var(--ink); }
  body[data-appearance="system"] input,
  body[data-appearance="system"] select,
  body[data-appearance="system"] textarea,
  body[data-appearance="system"] .day-pill { background: rgb(31 9 36 / 0.88); color: var(--ink); border-color: var(--line); }
  body[data-appearance="system"] input[type="date"],
  body[data-appearance="system"] #calendarPerson {
    background: var(--control-3);
    color: #020304;
    border-color: transparent;
    box-shadow: none;
  }
  body[data-appearance="system"] #locationFilter,
  body[data-appearance="system"] #shiftLocation,
  body[data-appearance="system"] #calendarLocation,
  body[data-appearance="system"] #moveLocationTarget,
  body[data-appearance="system"] .permanent-location {
    background: var(--control-4);
    color: var(--control-ink);
    border-color: transparent;
    box-shadow: none;
  }
  body[data-appearance="system"] label,
  body[data-appearance="system"] .role-chip,
  body[data-appearance="system"] .location-chip,
  body[data-appearance="system"] .shift-location,
  body[data-appearance="system"] .shift-note,
  body[data-appearance="system"] .shift-comment,
  body[data-appearance="system"] .open-shift-comment,
  body[data-appearance="system"] .daily-comment { color: #d9e4ee; }
  body[data-appearance="system"] .nav-button,
  body[data-appearance="system"] .secondary-button,
  body[data-appearance="system"] .template-item,
  body[data-appearance="system"] .open-shift-panel,
  body[data-appearance="system"] .notice,
  body[data-appearance="system"] .share-panel { color: var(--ink); }
  body[data-appearance="system"] .shift-card.empty { background: rgb(45 14 51 / 0.66); border-color: rgb(255 170 225 / 0.32); }
  body[data-appearance="system"] .unavailable { background: repeating-linear-gradient(135deg, rgb(49 16 53 / 0.72), rgb(49 16 53 / 0.72) 8px, rgb(70 22 65 / 0.72) 8px, rgb(70 22 65 / 0.72) 16px); }
  body[data-appearance="system"] .primary-button {
    background: linear-gradient(135deg, #ff7ad9, #b967ff);
    color: #241027;
    box-shadow: 0 16px 38px rgb(255 122 217 / 0.22), 0 12px 34px rgb(185 103 255 / 0.16);
  }
}

.day-pill.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 980px) {
  .sidebar-collapse {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-tabs {
    grid-template-columns: repeat(5, 1fr);
  }

  .topbar,
  .split-layout,
  .about-layout,
  .about-details,
  .setup-action-grid,
  .settings-grid,
  .manage-tabs,
  .settings-tabs,
  .reports-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-shell {
    padding: 20px;
  }

  .provider-buttons {
    grid-template-columns: 1fr;
  }
  body.native-app .app-shell {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  body.native-app .main {
    padding: 14px max(14px, env(safe-area-inset-right)) 18px max(14px, env(safe-area-inset-left));
  }

  body.native-app .sidebar {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: var(--panel-solid);
  }

  body.native-app .sidebar-top,
  body.native-app .brand,
  body.native-app .summary-panel,
  body.native-app .ongoing-panel {
    display: none;
  }

  .nav-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  body.native-app .nav-button {
    min-width: 0;
    min-height: 50px;
    padding: 5px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    text-align: center;
  }

  body.native-app .nav-button .icon {
    width: auto;
    font-size: 17px;
  }

  .toolbar select,
  .toolbar input,
  .toolbar button,
  .share-menu {
    width: 100%;
  }

  .profile-menu {
    width: 100%;
  }

  .account-profile-button {
    max-width: none;
    justify-content: flex-start;
  }

  .location-control,
  .location-control select {
    width: 100%;
  }

  .dashboard-card.today-card {
    grid-column: span 1;
    min-height: 280px;
  }

  .location-checks,
  .permanent-shift-row {
    grid-template-columns: 1fr;
  }

  .permanent-shift-row .icon-button {
    width: 100%;
  }

  .week-stepper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .toolbar .week-stepper button {
    width: 100%;
  }

  .share-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .two-cols,
  .dialog-body footer {
    grid-template-columns: 1fr;
  }

  .dialog-body footer.shift-dialog-actions {
    grid-template-columns: 1fr;
  }
}

@page {
  size: landscape;
  margin: 5mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    background: #ffffff !important;
    color: #111827 !important;
  }

  .sidebar,
  .toolbar,
  .notice-row,
  .no-print,
  dialog {
    display: none !important;
  }

  .app-shell,
  .main {
    display: block;
    min-height: 0;
    padding: 0;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .topbar {
    display: block;
    margin: 0 0 4mm;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .topbar .eyebrow {
    margin: 0 0 2mm;
    color: #4b5563;
    font-size: 8pt;
  }

  #weekTitle {
    margin: 0;
    color: #111827;
  }

  #weekTitle .week-workplace {
    font-size: 15pt;
  }

  #weekTitle .week-range {
    display: block;
    margin-top: 1mm;
    color: #4b5563;
    font-size: 8.5pt;
  }

  #plannerView {
    display: block !important;
    break-before: auto;
    break-after: auto;
    page-break-before: auto;
    page-break-after: auto;
  }

  #dashboardView,
  #manageView,
  #reportsView,
  #settingsView {
    display: none !important;
  }

  .print-only {
    display: flex;
  }

  .print-summary {
    gap: 3mm;
    margin: 0 0 3mm;
    color: #111827;
  }

  .print-summary > div {
    min-width: 28mm;
    padding: 1.6mm 2.2mm;
    border: 0.25mm solid #d1d5db;
    border-radius: 2mm;
    background: #ffffff;
  }

  #printNotesText {
    color: #4b5563;
    font-size: 8pt;
  }

  body[data-print-hours="false"] #printHoursBlock,
  body[data-print-shifts="false"] #printShiftsBlock,
  body[data-print-comments="false"] .shift-comment {
    display: none !important;
  }

  body[data-print-comments="true"] .shift-comment {
    display: -webkit-box !important;
  }

  .rota-grid {
    --print-cell-height: 14mm;
    --print-header-height: 10mm;
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 0;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: visible;
    padding: 0;
    font-size: 7pt;
    break-before: auto;
    break-after: auto;
    page-break-before: auto;
    page-break-after: auto;
  }

  .rota-row {
    display: grid;
    grid-template-columns: 30mm repeat(7, minmax(0, 1fr));
    gap: 0.8mm;
    align-items: stretch;
    margin: 0 0 0.8mm;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto;
    page-break-after: auto;
  }

  .rota-header-row {
    --print-cell-height: var(--print-header-height);
    break-after: avoid;
    page-break-after: avoid;
  }

  .grid-head,
  .person-head,
  .person-row-label {
    display: block;
    position: static;
    box-sizing: border-box;
    height: var(--print-cell-height);
    min-height: var(--print-cell-height);
    max-height: var(--print-cell-height);
    padding: 1.4mm 1.6mm;
    background: #f3f4f6 !important;
    color: #111827 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .person-head,
  .person-row-label {
    width: auto;
  }

  .person-row-label {
    display: grid;
    align-content: center;
    gap: 0.45mm;
  }

  .grid-head,
  .shift-cell {
    width: auto;
  }

  .grid-cell {
    display: block;
    box-sizing: border-box;
    height: var(--print-cell-height);
    min-height: var(--print-cell-height);
    max-height: var(--print-cell-height);
    border: 0.2mm solid #d1d5db;
    border-radius: 1.8mm;
    background: #ffffff !important;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden !important;
  }

  .shift-cell {
    display: flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    height: var(--print-cell-height);
    min-height: var(--print-cell-height);
    max-height: var(--print-cell-height);
    padding: 0;
    border: 0;
    background: transparent !important;
    overflow: hidden !important;
  }

  .unavailable {
    background: #f7f3ef !important;
  }

  .shift-card {
    display: block;
    box-sizing: border-box;
    width: 90%;
    max-width: 90%;
    height: 90%;
    min-height: 90%;
    max-height: 90%;
    margin: 0 auto;
    padding: 1.1mm 1.4mm;
    border-radius: 1.8mm;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto;
    page-break-after: auto;
    gap: 0.5mm;
    line-height: 1.15;
    overflow: hidden;
  }

  .shift-card.day-off-card,
  .shift-card.holiday-card {
    display: flex;
    width: 90%;
    max-width: 90%;
    height: 90%;
    min-height: 90%;
    max-height: 90%;
    aspect-ratio: auto;
    padding: 1.1mm 1.4mm;
    align-items: center;
    justify-content: flex-start;
  }

  .shift-card.empty {
    background: #ffffff !important;
    color: #4b5563;
    border-style: solid;
  }

  .shift-time {
    display: inline;
    font-size: 7.5pt;
  }

  .shift-location,
  .shift-note,
  .shift-comment {
    display: inline;
    color: #374151 !important;
    font-size: 6.4pt;
  }

  .shift-time::after,
  .shift-location::after {
    content: " · ";
  }

  .shift-comment {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .person-name {
    color: #111827;
    font-size: 8pt;
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .person-role,
  .day-date {
    color: #4b5563 !important;
    font-size: 6.3pt;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hours-pill {
    max-width: 100%;
    min-height: 0;
    margin-top: 1mm;
    padding: 0.35mm 1.3mm;
    background: #eef2f7 !important;
    color: #111827 !important;
    font-size: 6.2pt;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .holiday-plane {
    width: 4mm;
    height: 4mm;
    margin-right: 0.8mm;
    background: #d9eee8 !important;
    color: #111827 !important;
    font-size: 7pt;
  }

  body[data-print-density="compact"] .rota-grid {
    --print-cell-height: 13mm;
    --print-header-height: 8.5mm;
    font-size: 6.3pt;
  }

  body[data-print-density="compact"] .rota-row {
    grid-template-columns: 29mm repeat(7, minmax(0, 1fr));
    gap: 0.55mm;
    margin-bottom: 0.55mm;
  }

  body[data-print-density="compact"] .person-head,
  body[data-print-density="compact"] .person-row-label {
    width: auto;
    padding: 0.75mm 1mm;
  }

  body[data-print-density="compact"] .person-row-label {
    gap: 0.25mm;
  }

  body[data-print-density="compact"] .grid-cell {
    height: var(--print-cell-height);
    min-height: var(--print-cell-height);
    max-height: var(--print-cell-height);
  }

  body[data-print-density="compact"] .shift-cell {
    padding: 0;
  }

  body[data-print-density="compact"] .shift-card {
    padding: 0.8mm 1mm;
    gap: 0.35mm;
    font-size: 6.2pt;
  }

  body[data-print-density="compact"] .person-name {
    font-size: 6.8pt;
    line-height: 1.05;
  }

  body[data-print-density="compact"] .person-role {
    font-size: 5.3pt;
    line-height: 1.05;
  }

  body[data-print-density="compact"] .hours-pill {
    margin-top: 0;
    padding: 0.25mm 0.9mm;
    font-size: 5.2pt;
    line-height: 1.05;
  }

  body[data-print-density="large"] .rota-grid {
    --print-cell-height: 17mm;
    --print-header-height: 11.5mm;
    font-size: 8.5pt;
  }

  body[data-print-density="large"] .rota-row {
    grid-template-columns: 34mm repeat(7, minmax(0, 1fr));
    gap: 1mm;
    margin-bottom: 1mm;
  }

  body[data-print-density="large"] .person-head,
  body[data-print-density="large"] .person-row-label {
    width: auto;
  }

  body[data-print-density="large"] .grid-cell {
    height: var(--print-cell-height);
    min-height: var(--print-cell-height);
    max-height: var(--print-cell-height);
  }

  body[data-print-density="large"] .shift-card {
    padding: 1.4mm 1.8mm;
  }

  .dashboard-card,
  .summary-panel,
  .mini-list,
  .rules-panel,
  .manage-card,
  .settings-grid section {
    box-shadow: none;
  }
}
