:root {
  --bg: #0f172a;
  --card: #1e293b;
  --line: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --gold: #c4a35a;
  --high: #f87171;
  --med: #fbbf24;
  --ok: #34d399;
  --pad: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Segoe UI, system-ui, sans-serif; }
body { padding-bottom: 84px; min-height: 100dvh; }
body.on-login { padding-bottom: 0; }
.login-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 12px 0 24px; }
.login-screen header.app { text-align: center; position: static; padding-bottom: 12px; }
.login-screen header.app h1 { font-size: 34px; letter-spacing: .02em; }
.login-screen .pin-card { max-width: 320px; margin: 0 auto 8px; }
.login-screen .pin { min-height: 40px; font-size: 32px; }
.login-screen .pad { max-width: 320px; width: calc(100% - 48px); margin: 8px auto 0; }
.login-screen .pad button { font-size: 28px; padding: 18px 0; }
.login-screen .err { text-align: center; }
header.app { padding: 14px var(--pad) 8px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
header.app h1 { margin: 0; font-size: 20px; }
header.app .who { color: var(--muted); font-size: 13px; margin-top: 2px; }
button.logout { background: #334155; color: var(--text); padding: 8px 10px; border-radius: 10px; flex: none; }
button.logout svg { display: block; }
.card { background: var(--card); border-radius: 12px; padding: 14px; margin: 0 var(--pad) 12px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pri { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.pri.high { background: #7f1d1d; color: #fecaca; }
.pri.medium { background: #78350f; color: #fde68a; }
.pri.warn { background: #854d0e; color: #fde047; }
.pri.low { background: #064e3b; color: #a7f3d0; }
.task { display: block; width: 100%; text-align: left; background: var(--card); border: 0; color: inherit; border-radius: 12px; padding: 14px; margin: 0 var(--pad) 10px; }
.task h3 { margin: 0 0 4px; font-size: 16px; }
.task p { margin: 0; color: var(--muted); font-size: 13px; }
button, .btn { appearance: none; border: 0; border-radius: 10px; padding: 12px 14px; font-size: 16px; font-weight: 600; background: var(--gold); color: #0f172a; touch-action: manipulation; cursor: pointer; -webkit-tap-highlight-color: rgba(196, 163, 90, 0.35); }
.task, .tcard, .tmini, .nav button, .svc { touch-action: manipulation; cursor: pointer; -webkit-tap-highlight-color: rgba(196, 163, 90, 0.35); }
#ld-toast { position: fixed; left: 16px; right: 16px; bottom: 96px; background: #c4a35a; color: #0f172a; padding: 12px 16px; border-radius: 10px; font-weight: 700; text-align: center; z-index: 99; pointer-events: none; }
button.ghost, .btn.ghost { background: #334155; color: var(--text); }
button.danger { background: #7f1d1d; color: #fecaca; }
button:disabled { opacity: .5; }
.stack { display: grid; gap: 8px; }
.staff-pick { width: calc(100% - 32px); margin: 0 16px 8px; padding: 16px; font-size: 18px; background: var(--card); color: var(--text); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 16px; }
.pad button { font-size: 22px; padding: 16px 0; background: #1e293b; color: var(--text); }
.pin { text-align: center; font-size: 28px; letter-spacing: 8px; min-height: 36px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; background: #0f172a; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 16px; }
textarea { min-height: 70px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: #111827; border-top: 1px solid var(--line); padding: 8px 2px calc(8px + env(safe-area-inset-bottom)); }
.nav button { background: transparent; color: var(--muted); font-size: 10px; padding: 8px 2px; }
.sgrid { overflow-x: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
table.sched { min-width: 720px; font-size: 12px; }
table.sched th, table.sched td { padding: 6px 4px; vertical-align: top; }
table.sched th.today { color: var(--gold); }
button.scell, span.scell, div.scell { display: block; width: 100%; min-height: 48px; border-radius: 8px; padding: 6px 2px; font-size: 11px; font-weight: 700; background: #334155; color: var(--text); text-align: center; }
span.scell { text-align: right; min-width: 110px; }
button.scell.off, span.scell.off, div.scell.off { background: #14532d; color: #bbf7d0; }
button.scell.vacation, span.scell.vacation, div.scell.vacation { background: #581c87; color: #e9d5ff; }
button.scell.holiday, span.scell.holiday, div.scell.holiday { background: #831843; color: #fbcfe8; }
button.scell.am, span.scell.am, div.scell.am { background: #1e3a5f; color: #bfdbfe; }
button.scell.pm, span.scell.pm, div.scell.pm { background: #7f1d1d; color: #fecaca; }
button.scell.mid, span.scell.mid, div.scell.mid { background: #7c2d12; color: #fed7aa; }
.scell b { display: block; font-size: 12px; line-height: 1.1; }
.scell span { display: block; font-size: 9px; font-weight: 600; opacity: .9; margin-top: 2px; }
.sweek { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 8px; }
.sweek-lab { text-align: center; flex: 1; font-size: 15px; }
.sweek button[disabled] { opacity: 0.4; }
button.scell.today, div.scell.today { box-shadow: inset 0 0 0 2px var(--gold); }
button.scell.pick { box-shadow: inset 0 0 0 2px #fff; }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.srow.today { color: var(--gold); }
.sdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 0 12px 6px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; }
.sday i { display: block; font-style: normal; font-weight: 600; opacity: .8; }
.sday.today { color: var(--gold); }
.sperson { padding: 0 12px 12px; }
.sperson.mine .sname b { color: var(--gold); }
.sname { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.sname span { color: var(--muted); font-size: 12px; }
.schips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.nav button.on { color: var(--gold); }
.fine { color: var(--muted); font-size: 12px; line-height: 1.4; }
.err { color: #fca5a5; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.live { font-size: 13px; color: #93c5fd; }
h2 { font-size: 15px; color: var(--muted); font-weight: 600; margin: 18px 16px 8px; }
.gbox h3 { margin: 0 0 6px; font-size: 18px; }
.gbox .fine { padding: 0; margin: 0 0 10px; }
.gbox .task { width: 100%; margin: 0 0 8px; }
.gbox .task:last-child { margin-bottom: 0; }
.hide { display: none; }
.dur { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chkrow { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: transparent; color: inherit; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; font-weight: 400; }
.chkrow .box { width: 22px; height: 22px; border: 2px solid var(--gold); border-radius: 4px; flex: none; margin-top: 2px; }
.chkrow.on .box { background: var(--ok); border-color: var(--ok); }
.insp { padding: 10px 0; border-bottom: 1px solid var(--line); }
.insp .rate { display: flex; gap: 6px; margin: 6px 0; }
.insp .rate button { padding: 8px 12px; font-size: 13px; background: #334155; color: var(--text); }
.insp .rate button.on { background: var(--gold); color: #0f172a; }
.insp .rate button.bad { background: #7f1d1d; color: #fecaca; }
.fstrip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 8px; }
.tstrip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 0 16px 12px; }
.tmini { background: #1e293b; border-radius: 12px; padding: 12px 10px; text-align: center; border: 2px solid #334155; color: inherit; cursor: pointer; }
.tmini.warn { border-color: #fbbf24; background: #3b2f12; }
.tmini.crit { border-color: #f87171; background: #3f1515; }
.tmini.order { border-color: #38bdf8; background: #0c2a3d; }
.tmini .dn { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tmini.warn .dn { color: #fbbf24; }
.tmini.crit .dn { color: #fca5a5; }
.tmini.order .dn { color: #7dd3fc; }
.tmini .lbl { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.tcard { display: block; width: calc(100% - 32px); margin: 0 16px 12px; text-align: left; background: #1e293b; border: 2px solid #334155; border-radius: 12px; padding: 14px; color: inherit; cursor: pointer; }
h2.inline { margin: 14px 0 8px; }
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
table.fuelings { min-width: 520px; }
table.fuelings th, table.fuelings td { font-size: 12px; padding: 6px 8px 6px 0; white-space: nowrap; vertical-align: top; }
table.fuelings td.meters { white-space: normal; min-width: 120px; }
.tcard.ok { border-color: #34d399; background: #0f2a22; }
.tcard.warn { border-color: #fbbf24; background: #3b2f12; }
.tcard.crit { border-color: #f87171; background: #3f1515; }
.tcard.order { border-color: #38bdf8; background: #0c2a3d; }
.tmini.ok { border-color: #34d399; background: #0f2a22; }
.tcard.ok .dn { color: #6ee7b7; }
.tmini.ok .dn { color: #6ee7b7; }
.tcard .dn { font-size: 44px; font-weight: 800; line-height: 1; }
.tcard.warn .dn { color: #fbbf24; }
.tcard.crit .dn { color: #fca5a5; }
.tcard.order .dn { color: #7dd3fc; }
.tcard .dn span { font-size: 16px; font-weight: 600; color: #94a3b8; }
.fcard { margin-bottom: 10px; }
.fcard.needfuel { border: 2px solid #f87171; background: #3f1515; }
.ficons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.need { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.need svg { width: 14px; height: 14px; flex: none; }
.need-fuel { background: #7f1d1d; color: #fecaca; }
.need-put { background: #78350f; color: #fde68a; }
.need-pull { background: #134e4a; color: #99f6e4; }
.need-fueled { background: #064e3b; color: #a7f3d0; }
.need-lav { background: #44403c; color: #e7c9a5; }
.need-ice { background: #1e3a5f; color: #93c5fd; }
.fcard.ffueled { border: 2px solid #34d399; }
.fcard.fdone { opacity: .72; }
.svc { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: transparent; color: inherit; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; font-weight: 400; }
.svc .box { width: 22px; height: 22px; border: 2px solid var(--gold); border-radius: 4px; flex: none; margin-top: 2px; }
.svc.on .box { background: var(--ok); border-color: var(--ok); }
.svc.need { background: #1e293b; border-radius: 10px; padding: 12px; margin: 6px 0; border-bottom: 0; border: 1px solid #fbbf24; }
