/* ══════════════════════════════════════════════════════════════
   CREWPSR — THEMES
   Each theme has: light (default), dark, system (media query)
   Usage: data-theme="ocean|midnight|sunset|forest|rose|slate"
          data-mode="light|dark|system"
   ══════════════════════════════════════════════════════════════ */

/* ── Fixed semantic colours (same across all themes) ── */
:root {
  --yellow:   #f59e0b;
  --yellow-lt:#fef3c7;
  --green:    #059669;
  --green-lt: #d1fae5;
  --red:      #dc2626;
  --red-lt:   #fee2e2;
  --early:    #2563eb;
  --early-lt: #dbeafe;
  --late:     #7c3aed;
  --late-lt:  #ede9fe;
  --off:      #059669;
  --off-lt:   #d1fae5;
  --shadow:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow2:  0 4px 16px rgba(0,0,0,0.08);
  --radius:   14px;
}

/* ══════════════════════════════════════════════════════════════
   1. OCEAN BLUE (default / original)
   ══════════════════════════════════════════════════════════════ */
:root,
[data-theme="ocean"][data-mode="light"],
[data-theme="ocean"]:not([data-mode="dark"]) {
  --bg:       #f0f4ff;
  --bg2:      #e4eaf8;
  --bg3:      #d8e1f5;
  --surface:  #ffffff;
  --blue:     #1a4fba;
  --blue2:    #2563eb;
  --blue-lt:  #e8effe;
  --sky:      #3b82f6;
  --text:     #0f172a;
  --text2:    #475569;
  --text3:    #94a3b8;
  --border:   #e2e8f0;
  --border2:  #cbd5e1;
}
[data-theme="ocean"][data-mode="dark"] {
  --bg:       #0f1117;
  --bg2:      #161922;
  --bg3:      #1c2030;
  --surface:  #1e2235;
  --blue:     #4d85f5;
  --blue2:    #5b9cf6;
  --blue-lt:  #1a2a44;
  --sky:      #60a5fa;
  --yellow:   #fbbf24;
  --yellow-lt:#2a1f0a;
  --green:    #34d399;
  --green-lt: #0f2820;
  --red:      #f87171;
  --red-lt:   #2a0f0f;
  --text:     #e8ecf4;
  --text2:    #8892a4;
  --text3:    #4a5568;
  --border:   #2a3048;
  --border2:  #3a4060;
  --early:    #5b9cf6;
  --early-lt: #1a2a44;
  --late:     #a78bfa;
  --late-lt:  #2a1f44;
  --off:      #34d399;
  --off-lt:   #0f2820;
  --shadow:   0 1px 3px rgba(0,0,0,0.3);
  --shadow2:  0 4px 16px rgba(0,0,0,0.4);
}
@media (prefers-color-scheme: dark) {
  [data-theme="ocean"][data-mode="system"] {
    --bg:       #0f1117;
    --bg2:      #161922;
    --bg3:      #1c2030;
    --surface:  #1e2235;
    --blue:     #4d85f5;
    --blue2:    #5b9cf6;
    --blue-lt:  #1a2a44;
    --sky:      #60a5fa;
    --yellow:   #fbbf24;
    --yellow-lt:#2a1f0a;
    --green:    #34d399;
    --green-lt: #0f2820;
    --red:      #f87171;
    --red-lt:   #2a0f0f;
    --text:     #e8ecf4;
    --text2:    #8892a4;
    --text3:    #4a5568;
    --border:   #2a3048;
    --border2:  #3a4060;
    --early:    #5b9cf6;
    --early-lt: #1a2a44;
    --late:     #a78bfa;
    --late-lt:  #2a1f44;
    --off:      #34d399;
    --off-lt:   #0f2820;
    --shadow:   0 1px 3px rgba(0,0,0,0.3);
    --shadow2:  0 4px 16px rgba(0,0,0,0.4);
  }
}

/* Legacy support: old data-theme="dark/light/system" */
[data-theme="dark"] {
  --bg:       #0f1117;
  --bg2:      #161922;
  --bg3:      #1c2030;
  --surface:  #1e2235;
  --blue:     #4d85f5;
  --blue2:    #5b9cf6;
  --blue-lt:  #1a2a44;
  --sky:      #60a5fa;
  --yellow:   #fbbf24;
  --yellow-lt:#2a1f0a;
  --green:    #34d399;
  --green-lt: #0f2820;
  --red:      #f87171;
  --red-lt:   #2a0f0f;
  --text:     #e8ecf4;
  --text2:    #8892a4;
  --text3:    #4a5568;
  --border:   #2a3048;
  --border2:  #3a4060;
  --early:    #5b9cf6;
  --early-lt: #1a2a44;
  --late:     #a78bfa;
  --late-lt:  #2a1f44;
  --off:      #34d399;
  --off-lt:   #0f2820;
  --shadow:   0 1px 3px rgba(0,0,0,0.3);
  --shadow2:  0 4px 16px rgba(0,0,0,0.4);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg:       #0f1117;
    --bg2:      #161922;
    --bg3:      #1c2030;
    --surface:  #1e2235;
    --blue:     #4d85f5;
    --blue2:    #5b9cf6;
    --blue-lt:  #1a2a44;
    --sky:      #60a5fa;
    --yellow:   #fbbf24;
    --yellow-lt:#2a1f0a;
    --green:    #34d399;
    --green-lt: #0f2820;
    --red:      #f87171;
    --red-lt:   #2a0f0f;
    --text:     #e8ecf4;
    --text2:    #8892a4;
    --text3:    #4a5568;
    --border:   #2a3048;
    --border2:  #3a4060;
    --early:    #5b9cf6;
    --early-lt: #1a2a44;
    --late:     #a78bfa;
    --late-lt:  #2a1f44;
    --off:      #34d399;
    --off-lt:   #0f2820;
    --shadow:   0 1px 3px rgba(0,0,0,0.3);
    --shadow2:  0 4px 16px rgba(0,0,0,0.4);
  }
}

/* ══════════════════════════════════════════════════════════════
   2. MIDNIGHT — deep navy / indigo
   ══════════════════════════════════════════════════════════════ */
[data-theme="midnight"][data-mode="light"],
[data-theme="midnight"]:not([data-mode="dark"]) {
  --bg:       #eef0f8;
  --bg2:      #e0e3f2;
  --bg3:      #d0d5ee;
  --surface:  #ffffff;
  --blue:     #3730a3;
  --blue2:    #4338ca;
  --blue-lt:  #e0e7ff;
  --sky:      #6366f1;
  --text:     #1e1b4b;
  --text2:    #4c4980;
  --text3:    #9896c0;
  --border:   #dddcf0;
  --border2:  #c7c5e8;
}
[data-theme="midnight"][data-mode="dark"] {
  --bg:       #08070f;
  --bg2:      #0e0d1a;
  --bg3:      #141226;
  --surface:  #1a1830;
  --blue:     #818cf8;
  --blue2:    #a5b4fc;
  --blue-lt:  #1e1b40;
  --sky:      #a5b4fc;
  --yellow:   #fbbf24;
  --yellow-lt:#251c08;
  --green:    #34d399;
  --green-lt: #0a2018;
  --red:      #f87171;
  --red-lt:   #250c0c;
  --text:     #ece8ff;
  --text2:    #9490c0;
  --text3:    #504c78;
  --border:   #28264a;
  --border2:  #38356a;
  --early:    #818cf8;
  --early-lt: #1e1b40;
  --late:     #c084fc;
  --late-lt:  #2a1845;
  --off:      #34d399;
  --off-lt:   #0a2018;
  --shadow:   0 1px 3px rgba(0,0,0,0.5);
  --shadow2:  0 4px 16px rgba(0,0,0,0.6);
}
@media (prefers-color-scheme: dark) {
  [data-theme="midnight"][data-mode="system"] {
    --bg:       #08070f;
    --bg2:      #0e0d1a;
    --bg3:      #141226;
    --surface:  #1a1830;
    --blue:     #818cf8;
    --blue2:    #a5b4fc;
    --blue-lt:  #1e1b40;
    --sky:      #a5b4fc;
    --yellow:   #fbbf24;
    --yellow-lt:#251c08;
    --green:    #34d399;
    --green-lt: #0a2018;
    --red:      #f87171;
    --red-lt:   #250c0c;
    --text:     #ece8ff;
    --text2:    #9490c0;
    --text3:    #504c78;
    --border:   #28264a;
    --border2:  #38356a;
    --early:    #818cf8;
    --early-lt: #1e1b40;
    --late:     #c084fc;
    --late-lt:  #2a1845;
    --off:      #34d399;
    --off-lt:   #0a2018;
    --shadow:   0 1px 3px rgba(0,0,0,0.5);
    --shadow2:  0 4px 16px rgba(0,0,0,0.6);
  }
}

/* ══════════════════════════════════════════════════════════════
   3. SUNSET — amber / coral / warm
   ══════════════════════════════════════════════════════════════ */
[data-theme="sunset"][data-mode="light"],
[data-theme="sunset"]:not([data-mode="dark"]) {
  --bg:       #fff8f0;
  --bg2:      #fdefd8;
  --bg3:      #fce3c0;
  --surface:  #ffffff;
  --blue:     #c2410c;
  --blue2:    #ea580c;
  --blue-lt:  #fff0e6;
  --sky:      #f97316;
  --text:     #1c0a00;
  --text2:    #7c4a1e;
  --text3:    #b07040;
  --border:   #f5dfc0;
  --border2:  #eecda0;
}
[data-theme="sunset"][data-mode="dark"] {
  --bg:       #120900;
  --bg2:      #1e1000;
  --bg3:      #2a1800;
  --surface:  #2c1a08;
  --blue:     #fb923c;
  --blue2:    #fdba74;
  --blue-lt:  #3a1c08;
  --sky:      #fb923c;
  --yellow:   #fcd34d;
  --yellow-lt:#2a1c00;
  --green:    #4ade80;
  --green-lt: #0a2010;
  --red:      #fca5a5;
  --red-lt:   #2a0808;
  --text:     #fff0e0;
  --text2:    #d4a070;
  --text3:    #7a4830;
  --border:   #3a2010;
  --border2:  #4a2c18;
  --early:    #fb923c;
  --early-lt: #3a1c08;
  --late:     #f472b6;
  --late-lt:  #3a0a20;
  --off:      #4ade80;
  --off-lt:   #0a2010;
  --shadow:   0 1px 3px rgba(0,0,0,0.4);
  --shadow2:  0 4px 16px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  [data-theme="sunset"][data-mode="system"] {
    --bg:       #120900;
    --bg2:      #1e1000;
    --bg3:      #2a1800;
    --surface:  #2c1a08;
    --blue:     #fb923c;
    --blue2:    #fdba74;
    --blue-lt:  #3a1c08;
    --sky:      #fb923c;
    --yellow:   #fcd34d;
    --yellow-lt:#2a1c00;
    --green:    #4ade80;
    --green-lt: #0a2010;
    --red:      #fca5a5;
    --red-lt:   #2a0808;
    --text:     #fff0e0;
    --text2:    #d4a070;
    --text3:    #7a4830;
    --border:   #3a2010;
    --border2:  #4a2c18;
    --early:    #fb923c;
    --early-lt: #3a1c08;
    --late:     #f472b6;
    --late-lt:  #3a0a20;
    --off:      #4ade80;
    --off-lt:   #0a2010;
    --shadow:   0 1px 3px rgba(0,0,0,0.4);
    --shadow2:  0 4px 16px rgba(0,0,0,0.5);
  }
}

/* ══════════════════════════════════════════════════════════════
   4. FOREST — deep green / emerald
   ══════════════════════════════════════════════════════════════ */
[data-theme="forest"][data-mode="light"],
[data-theme="forest"]:not([data-mode="dark"]) {
  --bg:       #f0faf4;
  --bg2:      #ddf2e6;
  --bg3:      #c6e8d4;
  --surface:  #ffffff;
  --blue:     #047857;
  --blue2:    #059669;
  --blue-lt:  #d1fae5;
  --sky:      #10b981;
  --text:     #022c1a;
  --text2:    #1f6648;
  --text3:    #5aaa80;
  --border:   #c6e8d4;
  --border2:  #a8d8bc;
}
[data-theme="forest"][data-mode="dark"] {
  --bg:       #020f08;
  --bg2:      #061a0e;
  --bg3:      #0a2614;
  --surface:  #0e2a18;
  --blue:     #34d399;
  --blue2:    #6ee7b7;
  --blue-lt:  #0a2818;
  --sky:      #6ee7b7;
  --yellow:   #fbbf24;
  --yellow-lt:#1e1800;
  --green:    #4ade80;
  --green-lt: #0a2010;
  --red:      #f87171;
  --red-lt:   #200808;
  --text:     #e0fff0;
  --text2:    #70c898;
  --text3:    #2a6048;
  --border:   #0e3020;
  --border2:  #164030;
  --early:    #34d399;
  --early-lt: #0a2818;
  --late:     #a78bfa;
  --late-lt:  #1e1040;
  --off:      #4ade80;
  --off-lt:   #0a2010;
  --shadow:   0 1px 3px rgba(0,0,0,0.4);
  --shadow2:  0 4px 16px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  [data-theme="forest"][data-mode="system"] {
    --bg:       #020f08;
    --bg2:      #061a0e;
    --bg3:      #0a2614;
    --surface:  #0e2a18;
    --blue:     #34d399;
    --blue2:    #6ee7b7;
    --blue-lt:  #0a2818;
    --sky:      #6ee7b7;
    --yellow:   #fbbf24;
    --yellow-lt:#1e1800;
    --green:    #4ade80;
    --green-lt: #0a2010;
    --red:      #f87171;
    --red-lt:   #200808;
    --text:     #e0fff0;
    --text2:    #70c898;
    --text3:    #2a6048;
    --border:   #0e3020;
    --border2:  #164030;
    --early:    #34d399;
    --early-lt: #0a2818;
    --late:     #a78bfa;
    --late-lt:  #1e1040;
    --off:      #4ade80;
    --off-lt:   #0a2010;
    --shadow:   0 1px 3px rgba(0,0,0,0.4);
    --shadow2:  0 4px 16px rgba(0,0,0,0.5);
  }
}

/* ══════════════════════════════════════════════════════════════
   5. ROSE — rose / bordeaux / warm pink
   ══════════════════════════════════════════════════════════════ */
[data-theme="rose"][data-mode="light"],
[data-theme="rose"]:not([data-mode="dark"]) {
  --bg:       #fff1f4;
  --bg2:      #fde0e6;
  --bg3:      #fac8d4;
  --surface:  #ffffff;
  --blue:     #9f1239;
  --blue2:    #be123c;
  --blue-lt:  #ffe4ec;
  --sky:      #f43f5e;
  --text:     #1a030a;
  --text2:    #7c2040;
  --text3:    #b86080;
  --border:   #f8d0dc;
  --border2:  #f0b8c8;
}
[data-theme="rose"][data-mode="dark"] {
  --bg:       #0f020a;
  --bg2:      #1a0410;
  --bg3:      #240818;
  --surface:  #280a1a;
  --blue:     #fb7185;
  --blue2:    #fda4af;
  --blue-lt:  #3a0820;
  --sky:      #fb7185;
  --yellow:   #fbbf24;
  --yellow-lt:#201400;
  --green:    #4ade80;
  --green-lt: #081a10;
  --red:      #fca5a5;
  --red-lt:   #1a0404;
  --text:     #ffe8f0;
  --text2:    #d08090;
  --text3:    #703040;
  --border:   #3a1020;
  --border2:  #4a1830;
  --early:    #fb7185;
  --early-lt: #3a0820;
  --late:     #c084fc;
  --late-lt:  #280a40;
  --off:      #4ade80;
  --off-lt:   #081a10;
  --shadow:   0 1px 3px rgba(0,0,0,0.4);
  --shadow2:  0 4px 16px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  [data-theme="rose"][data-mode="system"] {
    --bg:       #0f020a;
    --bg2:      #1a0410;
    --bg3:      #240818;
    --surface:  #280a1a;
    --blue:     #fb7185;
    --blue2:    #fda4af;
    --blue-lt:  #3a0820;
    --sky:      #fb7185;
    --yellow:   #fbbf24;
    --yellow-lt:#201400;
    --green:    #4ade80;
    --green-lt: #081a10;
    --red:      #fca5a5;
    --red-lt:   #1a0404;
    --text:     #ffe8f0;
    --text2:    #d08090;
    --text3:    #703040;
    --border:   #3a1020;
    --border2:  #4a1830;
    --early:    #fb7185;
    --early-lt: #3a0820;
    --late:     #c084fc;
    --late-lt:  #280a40;
    --off:      #4ade80;
    --off-lt:   #081a10;
    --shadow:   0 1px 3px rgba(0,0,0,0.4);
    --shadow2:  0 4px 16px rgba(0,0,0,0.5);
  }
}

/* ══════════════════════════════════════════════════════════════
   6. SLATE — neutral grey / teal accents
   ══════════════════════════════════════════════════════════════ */
[data-theme="slate"][data-mode="light"],
[data-theme="slate"]:not([data-mode="dark"]) {
  --bg:       #f4f6f8;
  --bg2:      #e8ecf0;
  --bg3:      #d8dee6;
  --surface:  #ffffff;
  --blue:     #0f766e;
  --blue2:    #0d9488;
  --blue-lt:  #ccfbf1;
  --sky:      #14b8a6;
  --text:     #0d1f2d;
  --text2:    #374e5c;
  --text3:    #7a9ab0;
  --border:   #dde3ea;
  --border2:  #c8d2da;
}
[data-theme="slate"][data-mode="dark"] {
  --bg:       #080e12;
  --bg2:      #0e1820;
  --bg3:      #14202c;
  --surface:  #18242e;
  --blue:     #2dd4bf;
  --blue2:    #5eead4;
  --blue-lt:  #0a2028;
  --sky:      #5eead4;
  --yellow:   #fbbf24;
  --yellow-lt:#1c1400;
  --green:    #4ade80;
  --green-lt: #081c10;
  --red:      #f87171;
  --red-lt:   #1c0808;
  --text:     #e0eef8;
  --text2:    #7aa0b8;
  --text3:    #304858;
  --border:   #1c3040;
  --border2:  #284050;
  --early:    #2dd4bf;
  --early-lt: #0a2028;
  --late:     #a78bfa;
  --late-lt:  #1c1040;
  --off:      #4ade80;
  --off-lt:   #081c10;
  --shadow:   0 1px 3px rgba(0,0,0,0.4);
  --shadow2:  0 4px 16px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  [data-theme="slate"][data-mode="system"] {
    --bg:       #080e12;
    --bg2:      #0e1820;
    --bg3:      #14202c;
    --surface:  #18242e;
    --blue:     #2dd4bf;
    --blue2:    #5eead4;
    --blue-lt:  #0a2028;
    --sky:      #5eead4;
    --yellow:   #fbbf24;
    --yellow-lt:#1c1400;
    --green:    #4ade80;
    --green-lt: #081c10;
    --red:      #f87171;
    --red-lt:   #1c0808;
    --text:     #e0eef8;
    --text2:    #7aa0b8;
    --text3:    #304858;
    --border:   #1c3040;
    --border2:  #284050;
    --early:    #2dd4bf;
    --early-lt: #0a2028;
    --late:     #a78bfa;
    --late-lt:  #1c1040;
    --off:      #4ade80;
    --off-lt:   #081c10;
    --shadow:   0 1px 3px rgba(0,0,0,0.4);
    --shadow2:  0 4px 16px rgba(0,0,0,0.5);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── APP SHELL ── */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.topbar-logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.topbar-logo span { color: var(--sky); }

.topbar-info {
  text-align: right;
  line-height: 1.3;
}

.topbar-info .day-label { font-size: 13px; font-weight: 600; color: var(--text); }
.topbar-info .roster-label { font-size: 11px; color: var(--text3); }

/* ── SCREENS ── */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  flex-direction: column;
  padding-bottom: max(80px, calc(60px + env(safe-area-inset-bottom)));
  background: var(--bg);
}
.screen.active { display: flex; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0 8px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.2s;
  font-family: 'Outfit', sans-serif;
}
.nav-btn.active { color: var(--blue); }
.nav-btn .nav-icon { font-size: 20px; line-height: 1; }
.nav-btn .nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 16px 10px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  margin: 20px 16px 8px;
}

/* ── TODAY HERO ── */
.today-hero {
  margin: 16px;
  background: linear-gradient(135deg, #1a4fba 0%, #2563eb 60%, #3b82f6 100%);
  border-radius: var(--radius);
  padding: 22px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(26,79,186,0.3);
  min-height: 120px;
}

[data-theme="dark"] .today-hero,
[data-theme="system"] .today-hero {
  background: linear-gradient(135deg, #1a2d5a 0%, #1e3a7a 60%, #2952a3 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border: 1px solid #2a3a5a;
}

@media (prefers-color-scheme: light) {
  [data-theme="system"] .today-hero {
    background: linear-gradient(135deg, #1a4fba 0%, #2563eb 60%, #3b82f6 100%);
    box-shadow: 0 4px 20px rgba(26,79,186,0.3);
    border: none;
  }
}

.today-hero::after {
  content: '✈';
  position: absolute;
  right: -5px; bottom: -15px;
  font-size: 100px;
  opacity: 0.06;
  transform: rotate(10deg);
  color: white;
}

.today-hero .shift-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.today-hero .shift-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: #ffffff;
}

.today-hero .cycle-info {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}

.today-hero .report-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

.cycle-strip {
  display: flex;
  gap: 3px;
  overflow: hidden;
}

.c-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
}
.c-pip.early { background: rgba(255,255,255,0.7); }
.c-pip.late  { background: rgba(200,180,255,0.7); }
.c-pip.off   { background: rgba(255,255,255,0.35); }
.c-pip.now   { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.c-pip.past  { opacity: 0.4; }

/* ── FLIGHT CARD ── */
.flight-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 16px 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.flight-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.plane-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.plane-badge.a1 { background: var(--early-lt); color: var(--early); }
.plane-badge.a2 { background: var(--late-lt); color: var(--late); }

.flight-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.flight-row:last-child { border-bottom: none; }

.flight-route {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-width: 80px;
}

.flight-times {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
}

.flight-note {
  font-size: 10px;
  color: var(--yellow);
  background: var(--yellow-lt);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── SWAP CARDS ── */
.swap-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  margin: 0 16px 8px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.2s ease forwards;
}

.swap-card.maybe {
  border-left: 3px dashed var(--yellow);
  opacity: 0.85;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(5px); }
  to   { opacity:1; transform:translateY(0); }
}

.swap-roster-badge {
  background: var(--blue);
  color: white;
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  line-height: 1.1;
}
.swap-roster-badge .srb-label { font-size: 8px; font-weight: 600; letter-spacing: 1px; opacity: 0.7; text-transform: uppercase; }
.swap-roster-badge .srb-num { font-size: 20px; font-weight: 800; }

.swap-info { flex: 1; min-width: 0; }
.swap-codes { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.swap-codes.empty { font-family: 'Outfit', sans-serif; font-style: italic; color: var(--text3); font-size: 12px; }

.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  margin-top: 4px;
  white-space: nowrap;
}

/* ── CALENDAR ── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.cal-month-title { font-size: 20px; font-weight: 700; color: var(--text); }

.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 12px;
}

.cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  padding: 4px 0 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  min-height: unset;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 2px 4px;
  cursor: pointer;
  gap: 2px;
  transition: transform 0.1s;
  position: relative;
}
.cal-day:active { transform: scale(0.9); }
.cal-day.empty { cursor: default; }

.cal-day .dn { font-size: 13px; font-weight: 500; line-height: 1; }
.cal-day .dd { width: 5px; height: 5px; border-radius: 50%; }
.cal-day .dest {
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
  opacity: 0.85;
  padding: 0 2px;
}
.cal-day .duty-icon {
  font-size: 16px;
  line-height: 1;
  filter: grayscale(1);
}
.cal-day .off-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--off);
  opacity: 0.7;
}

.cal-day.early { background: var(--early-lt); }
.cal-day.late  { background: var(--late-lt); }
.cal-day.off   { background: var(--off-lt); }
.cal-day.early .dn { color: var(--early); font-weight: 600; }
.cal-day.late .dn  { color: var(--late); font-weight: 600; }
.cal-day.off .dn   { color: var(--off); }

.cal-day.today-ring { box-shadow: 0 0 0 2px var(--blue); }
.cal-day.today-ring .dn { color: var(--blue); font-weight: 700; }

/* ── CYCLE VIS ── */
.cycle-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 0 16px 8px;
}

.cyc-cell {
  border-radius: 8px;
  padding: 6px 2px;
  text-align: center;
}
.cyc-cell .cn { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text3); margin-bottom: 2px; }
.cyc-cell .cl { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

.cyc-cell.early { background: var(--early-lt); }
.cyc-cell.late  { background: var(--late-lt); }
.cyc-cell.off   { background: var(--bg2); }
.cyc-cell.early .cl { color: var(--early); }
.cyc-cell.late .cl  { color: var(--late); }
.cyc-cell.off .cl   { color: var(--off); }
.cyc-cell.now { box-shadow: 0 0 0 2px var(--blue); }
.cyc-cell.now .cn, .cyc-cell.now .cl { color: var(--blue); }

/* ── SCHEDULE SCREEN ── */
.sched-day-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sched-day-tabs::-webkit-scrollbar { display: none; }

.day-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}
.day-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-lt);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 0 16px 4px;
}

.flight-segment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 16px 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.seg-header {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.seg-header.early { color: var(--early); background: var(--early-lt); }
.seg-header.late  { color: var(--late); background: var(--late-lt); }

.seg-plane-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.seg-plane-row:last-child { border-bottom: none; }

.seg-plane {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}
.seg-plane:last-child { border-right: none; }

.seg-plane-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}

.seg-report {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 6px;
}

.seg-report strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--blue);
}

.seg-flight {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.seg-route {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 68px;
}

.seg-times {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
}

.seg-note {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: var(--yellow);
  background: var(--yellow-lt);
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 4px;
}

/* ── INPUTS ── */
.inp-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
  display: block;
}

input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--text3); }
select option { background: var(--surface); color: var(--text); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 8px;
}
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--bg2); color: var(--text); border: 1.5px solid var(--border); }
.btn.small { font-size: 13px; padding: 9px; }

/* ── CREW DIRECTORY ── */
.crew-roster-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 16px 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.crew-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
}

.roster-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  background: var(--blue-lt);
  color: var(--blue);
  padding: 3px 9px;
  border-radius: 6px;
}

.crew-roster-body { display: none; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.crew-roster-body.open { display: block; }

.colleague-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}
.colleague-edit-row input {
  margin-bottom: 0;
  font-size: 12px;
  padding: 8px 10px;
}
.colleague-edit-row input.code-inp { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 1px; }
.colleague-edit-row input.phone-inp { color: #25d366; }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp 0.22s ease;
  border-top: 1px solid var(--border);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 32px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text2); margin-bottom: 16px; }

.shift-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.shift-pill.early { background: var(--early-lt); color: var(--early); }
.shift-pill.late  { background: var(--late-lt); color: var(--late); }
.shift-pill.off   { background: var(--off-lt); color: var(--off); }

/* Assignment picker */
.assign-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.assign-option:active { transform: scale(0.98); }
.assign-option.selected-a1 { border-color: var(--early); background: var(--early-lt); }
.assign-option.selected-a2 { border-color: var(--late); background: var(--late-lt); }
.assign-option.selected-hsby { border-color: var(--yellow); background: var(--yellow-lt); }
.assign-option.selected-ad   { border-color: var(--red);  background: var(--red-lt); }
.assign-option.selected-al   { border-color: var(--off);  background: var(--off-lt); }
.assign-option.selected-vto  { border-color: var(--off);  background: var(--off-lt); }
.assign-option.selected-sick { border-color: #e11d48;     background: #fff1f2; }
.assign-option.selected-ul   { border-color: var(--off);  background: var(--off-lt); }
.assign-option.selected-pl   { border-color: var(--off);  background: var(--off-lt); }
[data-theme="dark"] .assign-option.selected-sick { background: #3f0f1a; }
[data-theme="dark"] .assign-option.selected-pl   { background: #2a1f44; }
.cal-day.sick { background: #fff1f2; }
.cal-day.sick .dn { color: #e11d48; font-weight: 600; }
[data-theme="dark"] .cal-day.sick { background: #3f0f1a; }
[data-theme="dark"] .cal-day.sick .dn { color: #fb7185; }

.assign-label { font-size: 14px; font-weight: 600; }
.assign-flights { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text2); margin-top: 3px; }
.assign-check { font-size: 16px; }

/* ── SETTINGS ── */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 600; }
.setting-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.setting-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-lt);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ── PIN PAD ── */
.pin-dots { display: flex; gap: 10px; justify-content: center; margin: 10px 0 16px; }
.pin-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border2); transition: all 0.15s; }
.pin-dot.filled { background: var(--blue); border-color: var(--blue); }

.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pin-key {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.1s;
}
.pin-key:active { background: var(--blue); color: white; transform: scale(0.93); }

/* ── EMPTY / ERROR ── */
.empty-state { text-align: center; padding: 32px 20px; color: var(--text3); }
.empty-state .big { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { font-size: 15px; color: var(--text2); margin-bottom: 4px; }
.empty-state p { font-size: 13px; line-height: 1.5; }

.pin-error { font-size: 12px; color: var(--red); text-align: center; margin-bottom: 8px; display: none; }

/* ── SETUP ── */
.setup-screen {
  position: fixed; inset: 0;
  background: var(--surface);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 28px 28px;
  padding-top: max(48px, env(safe-area-inset-top));
  overflow-y: auto;
  text-align: center;
}

.setup-logo {
  font-size: 42px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.setup-logo span { color: var(--sky); }

.setup-tagline { font-size: 14px; color: var(--text2); margin-bottom: 36px; line-height: 1.5; }
.setup-form { width: 100%; max-width: 340px; text-align: left; }

.step { display: none; }
.step.active { display: block; }

/* ── INFO TILES ── */
.info-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 1.5px solid;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, opacity 0.1s;
  box-shadow: var(--shadow);
}
.info-tile:active { transform: scale(0.95); opacity: 0.85; }
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
}

.info-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

/* ── HOME SLIDER DOTS ── */
#homeDots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
  min-height: 18px;
  flex-shrink: 0;
}

#homeSlider {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

#homeSlides {
  display: flex;
  height: 100%;
  width: 100%;
  min-width: 0;
  transition: transform 0.3s ease;
  will-change: transform;
}

#homeSlides > div {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
}

.home-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border2);
  transition: all 0.2s;
  cursor: pointer;
}

.home-dot.active {
  background: var(--blue);
  width: 18px;
  border-radius: 3px;
}

::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── TOGGLE SWITCH ── */
.toggle { position:relative; display:inline-block; width:44px; height:26px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider {
  position:absolute; inset:0; cursor:pointer;
  background:var(--border2); border-radius:26px; transition:0.2s;
}
.toggle-slider::before {
  content:''; position:absolute;
  width:20px; height:20px; left:3px; bottom:3px;
  background:white; border-radius:50%; transition:0.2s;
  box-shadow:0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background:var(--blue); }
.toggle input:checked + .toggle-slider::before { transform:translateX(18px); }
