:root {
  color-scheme: light;
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #edf1f7; --text: #111827;
  --muted: #687386; --line: #e1e6ee; --brand: #246bfd; --brand-2: #1555dc;
  --good: #16a36a; --warn: #ed8b22; --danger: #dc4254; --purple: #7c5ce7;
  --shadow: 0 16px 42px rgba(30, 45, 75, .09); --radius: 22px;
}
[data-theme="dark"] {
  color-scheme: dark; --bg: #0c111b; --surface: #151c28; --surface-2: #202938;
  --text: #f4f7fb; --muted: #97a4b8; --line: #2a3444; --brand: #5f8cff;
  --brand-2: #81a4ff; --shadow: 0 18px 48px rgba(0,0,0,.24);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 540px); min-height: 100vh; margin: 0 auto; padding: 0 18px 104px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; padding-top: env(safe-area-inset-top); }
.top-actions { display:flex; align-items:center; gap:9px; }
.app-logo { width:48px; height:48px; display:block; object-fit:cover; border-radius:15px; border:1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow:0 8px 20px rgba(18,105,217,.2); }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.55rem; letter-spacing: -.035em; }
h2 { font-size: 1.3rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 50%; font-size: 1.25rem; }
.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 20; transform: translateX(-50%); width: min(100%, 540px); display: grid; grid-template-columns: repeat(5,1fr); padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bottom-nav button { border: 0; background: none; color: var(--muted); min-height: 58px; border-radius: 16px; font-size: .7rem; font-weight: 700; display: grid; place-items: center; gap: 3px; }
.bottom-nav button span { font-size: 1.3rem; line-height: 1; }
.bottom-nav button.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.bottom-nav .clock-nav { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: white; font-size: .72rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.hero-card { background: linear-gradient(145deg, #17213a, #0e1423); color: white; border: 0; padding: 22px; overflow: hidden; position: relative; }
.hero-card:after { content:""; position:absolute; width:150px; height:150px; border-radius:50%; background:#296dff; filter:blur(5px); opacity:.22; right:-58px; top:-45px; }
.hero-row, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shift-time { font-size: 2.15rem; font-weight: 760; letter-spacing: -.055em; margin: 8px 0 18px; }
.status-pill, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: .72rem; font-weight: 800; }
.status-pill { background: rgba(255,255,255,.12); color: #dbe7ff; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.metric { background: rgba(255,255,255,.09); border-radius: 16px; padding: 13px; }
.metric span, .stat span { display:block; font-size:.76rem; color: #afbad0; margin-bottom:4px; }
.metric strong { font-size:1.08rem; }
.primary { border:0; border-radius:16px; padding:15px 18px; background:var(--brand); color:#fff; font-weight:800; box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 28%, transparent); }
.primary:hover { background:var(--brand-2); }
.hero-card .primary { position:relative; z-index:1; background:white; color:#111827; width:100%; }
.secondary, .ghost { border:1px solid var(--line); background:var(--surface-2); color:var(--text); border-radius:14px; padding:11px 14px; font-weight:750; }
.ghost { background:transparent; }
.full { width:100%; }
.section-title { display:flex; justify-content:space-between; align-items:center; margin:24px 2px 11px; }
.section-title h2 { margin:0; font-size:1rem; }
.section-title button { border:0; background:none; color:var(--brand); font-weight:750; }
.progress { height:8px; background:var(--surface-2); border-radius:999px; overflow:hidden; margin:14px 0 8px; }
.progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand),#62a5ff); }
.stat-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.stat { padding:12px; border-radius:15px; background:var(--surface-2); }
.stat span { color:var(--muted); }
.stat strong { font-size:.94rem; }
.positive { color:var(--good)!important; } .negative { color:var(--danger)!important; }
.list { display:grid; gap:9px; }
.list-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border-radius:16px; background:var(--surface-2); }
.list-item p { margin:0; font-weight:750; }
.list-item small { color:var(--muted); }
.swatch { width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.month-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.month-head button { width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:var(--surface-2); color:var(--text); }
.weekdays, .calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.weekdays span { text-align:center; font-size:.7rem; color:var(--muted); font-weight:800; padding-bottom:5px; }
.day { border:0; background:transparent; color:var(--text); min-height:50px; border-radius:13px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; font-weight:700; }
.day:hover { background:var(--surface-2); }
.day.muted { color:var(--muted); opacity:.42; }
.day.today { outline:2px solid var(--brand); }
.day .dot { width:7px; height:7px; border-radius:50%; }
.legend { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.badge { background:var(--surface-2); color:var(--muted); gap:6px; padding:6px 9px; }
.clock-face { width:220px; height:220px; border-radius:50%; margin:18px auto 24px; display:grid; place-items:center; text-align:center; background:radial-gradient(circle at 35% 28%, color-mix(in srgb,var(--brand) 20%,var(--surface)), var(--surface)); border:1px solid var(--line); box-shadow:0 0 0 12px var(--surface-2), var(--shadow); }
.clock-face strong { display:block; font-size:2.2rem; letter-spacing:-.05em; }
.clock-face span { color:var(--muted); font-size:.82rem; }
.clock-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.clock-actions .primary { grid-column:1/-1; min-height:58px; }
.big-number { font-size:2.7rem; letter-spacing:-.06em; margin-bottom:4px; }
.split-bar { height:14px; display:flex; gap:3px; margin:18px 0; }
.split-bar span { display:block; border-radius:99px; min-width:5px; }
.menu-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.menu-card { border:1px solid var(--line); background:var(--surface); color:var(--text); text-align:left; border-radius:18px; padding:16px; min-height:105px; box-shadow:var(--shadow); }
.menu-card b { display:block; margin:10px 0 4px; }.menu-card small{color:var(--muted);}
.panel { display:none; }.panel.active { display:block; animation:fade .2s ease; }
@keyframes fade { from{opacity:0; transform:translateY(4px)} }
.sheet { width:min(100% - 16px, 520px); max-height:88vh; border:0; padding:0; border-radius:28px 28px 0 0; background:var(--surface); color:var(--text); margin:auto auto 0; }
.sheet::backdrop { background:rgba(4,9,18,.58); backdrop-filter:blur(3px); }
.sheet form { padding:10px 20px calc(22px + env(safe-area-inset-bottom)); overflow:auto; }
.sheet-handle { width:46px; height:5px; background:var(--line); border-radius:999px; margin:0 auto 17px; }
.sheet-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:15px; }
label { display:grid; gap:7px; font-size:.78rem; color:var(--muted); font-weight:750; margin-bottom:14px; }
input,select,textarea { width:100%; border:1px solid var(--line); background:var(--surface-2); color:var(--text); border-radius:14px; padding:13px; outline:none; }
input:focus,select:focus,textarea:focus { border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 14%,transparent); }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.sheet-actions{display:flex; justify-content:space-between; gap:10px}.danger{color:var(--danger)}
.switch-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); }
.switch { appearance:none; width:46px; height:27px; border-radius:99px; background:var(--surface-2); position:relative; transition:.2s; }
.switch:after { content:""; position:absolute; width:21px; height:21px; top:3px; left:3px; background:white; border-radius:50%; box-shadow:0 2px 5px rgba(0,0,0,.2); transition:.2s; }
.switch:checked { background:var(--brand); }.switch:checked:after{transform:translateX(19px)}
#toast { position:fixed; left:50%; bottom:96px; transform:translate(-50%,20px); padding:11px 16px; background:#111827; color:white; border-radius:999px; font-size:.82rem; font-weight:700; opacity:0; pointer-events:none; transition:.25s; z-index:50; white-space:nowrap; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.empty { text-align:center; color:var(--muted); padding:24px 12px; }
@media(min-width:760px){ .app-shell{padding-left:0;padding-right:0}.bottom-nav{border:1px solid var(--line); border-radius:22px 22px 0 0}.sheet{border-radius:28px;margin:auto}.topbar{padding-top:18px} }
@media print { .bottom-nav,.topbar,.no-print{display:none!important}.app-shell{width:100%;max-width:none;padding:0}.card{box-shadow:none;break-inside:avoid}body{background:white;color:black} }
