
:root{--navy:#052b4d;--blue:#0d5ea6;--sky:#eaf4fb;--ink:#17324d;--muted:#6f8395;--line:#d8e3eb;--green:#168447;--amber:#d88b00;--red:#c94242;--bg:#f4f7f9}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--ink)}button,input{font:inherit}.hidden{display:none!important}
.login{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(150deg,#052b4d,#0d5ea6)}
.login-card{width:min(390px,100%);background:white;border-radius:22px;padding:28px;box-shadow:0 18px 50px #001a2f55}.brand-mark{width:52px;height:52px;border-radius:15px;background:var(--navy);color:white;display:grid;place-items:center;font-weight:900}.login h1{margin:18px 0 3px}.login p{margin:0 0 22px;color:var(--muted)}label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#496275;margin-bottom:14px}input{width:100%;border:1px solid var(--line);border-radius:11px;padding:13px 12px;font-size:16px;background:white}.primary{border:0;border-radius:11px;background:var(--blue);color:white;padding:13px 16px;font-weight:800}.login .primary{width:100%}.msg{font-size:12px;color:var(--red);padding-top:10px}
.topbar{height:62px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 14px;position:sticky;top:0;z-index:20}.brand{display:flex;gap:5px;align-items:baseline}.brand b{color:var(--navy);letter-spacing:.08em}.brand span{font-size:11px;color:var(--blue);font-weight:900}.icon-btn{border:0;background:transparent;font-size:24px;padding:8px}.logout{border:1px solid var(--line);background:white;border-radius:9px;padding:8px 12px;font-weight:700;color:var(--navy)}
.drawer{position:fixed;z-index:40;top:0;bottom:0;left:0;width:min(320px,86vw);background:white;padding:16px;transform:translateX(-105%);transition:.2s}.drawer.open{transform:none}.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:8px 4px 18px;border-bottom:1px solid var(--line)}.drawer-head small{display:block;color:var(--muted);margin-top:4px}.drawer>button{width:100%;text-align:left;border:0;background:white;border-bottom:1px solid #edf2f5;padding:16px 9px;font-weight:750;color:var(--ink)}.drawer .danger{color:var(--red)}.shade{position:fixed;inset:0;background:#001d3355;z-index:30;display:none}.shade.show{display:block}
main{max-width:980px;margin:auto;padding:18px 14px 70px}.page{display:none}.page.active{display:block}.hello{display:flex;justify-content:space-between;align-items:center;padding:8px 2px 16px}.hello small,.page-head small{font-size:10px;letter-spacing:.12em;font-weight:900;color:var(--blue)}.hello h2,.page-head h2{margin:4px 0;font-size:27px}.hello p,.page-head p{margin:0;color:var(--muted);font-size:13px}.avatar{width:50px;height:50px;border-radius:50%;background:var(--navy);color:white;display:grid;place-items:center;font-weight:900}
.today-card{background:var(--navy);color:white;border-radius:18px;padding:18px;margin-bottom:16px}.today-card small{opacity:.7;font-weight:800}.today-card h3{margin:7px 0 5px}.today-card p{margin:0;color:#d5e5f0;font-size:13px}
.quick-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.quick-grid button{min-height:125px;text-align:left;border:1px solid var(--line);background:white;border-radius:16px;padding:16px}.quick-grid span{font-size:24px;color:var(--blue)}.quick-grid b,.quick-grid small{display:block}.quick-grid b{margin-top:12px;font-size:16px}.quick-grid small{color:var(--muted);margin-top:4px}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:8px 0 15px}.seg{display:flex;background:#e7eef3;border-radius:10px;padding:3px}.seg button{border:0;background:transparent;padding:8px 10px;border-radius:8px;font-size:12px;font-weight:800;color:var(--muted)}.seg button.active{background:white;color:var(--navy);box-shadow:0 1px 4px #0001}
.month-nav,.date-nav{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;margin-bottom:13px}.month-nav b{text-align:center}.month-nav button,.date-nav button{height:42px;border:1px solid var(--line);background:white;border-radius:10px;font-size:22px}.date-nav input{margin:0 8px;text-align:center}
.duty-card{background:white;border:1px solid var(--line);border-radius:16px;margin:10px 0;overflow:hidden}.duty-date{display:flex;justify-content:space-between;padding:11px 14px;background:#f7fafc;border-bottom:1px solid var(--line);font-size:12px}.duty-date b{font-size:14px}.duty-body{padding:14px}.duty-status{display:inline-block;font-size:10px;font-weight:900;padding:5px 8px;border-radius:999px;background:#e6eef5;color:#41627d;margin-bottom:9px}.duty-status.FLIGHT{background:#dcecff;color:#07579d}.duty-status.OFF{background:#eceff1;color:#65727d}.duty-status.HSBY{background:#d7efff;color:#07537f}.duty-status.AD{background:#dce4ff;color:#303f9f}.duty-status.DUTY{background:#fff3cd;color:#8a6400}.duty-status.USICK,.duty-status.USELF,.duty-status.NS{background:#fde5e5;color:#a92828}
.timeline{display:grid;grid-template-columns:62px 16px 1fr;gap:4px 6px;align-items:center}.timeline .time{font-weight:900;color:var(--navy)}.timeline .dot{width:8px;height:8px;border-radius:50%;background:var(--blue)}.timeline .what b{display:block}.timeline .what small{color:var(--muted)}.duty-actions{display:flex;justify-content:flex-end;margin-top:12px}.text-btn{border:0;background:#eef5fb;color:var(--blue);border-radius:9px;padding:9px 12px;font-weight:800}
.calendar{background:white;border:1px solid var(--line);border-radius:15px;overflow:hidden}.cal-head,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}.cal-head div{text-align:center;padding:9px 2px;font-size:10px;color:var(--muted);font-weight:800;background:#f7fafc}.cal-cell{min-height:76px;border-top:1px solid #edf2f5;border-right:1px solid #edf2f5;padding:6px;min-width:0}.cal-cell.muted{background:#fafbfc;color:#b7c1c8}.cal-cell b{font-size:11px}.cal-chip{display:block;margin-top:7px;border-radius:6px;padding:5px 3px;font-size:9px;font-weight:900;text-align:center;background:#e8eef3;color:#4f687b}.cal-chip.FLIGHT{background:#0d5ea6;color:white}.cal-chip.OFF{background:#e8ecef}.cal-chip.DUTY{background:#fff3cd;color:#7b5b00}.cal-chip.HSBY{background:#bfe5ff;color:#064d78}.cal-chip.AD{background:#d1d9ff;color:#25358f}
.efl-flight{background:white;border:1px solid var(--line);border-radius:17px;margin:12px 0;padding:16px}.flight-top{display:flex;justify-content:space-between;align-items:center}.flight-top h3{margin:0}.reg{font-size:12px;font-weight:900;color:var(--blue)}.route-row{display:grid;grid-template-columns:1fr 40px 1fr;align-items:center;margin:18px 0}.airport b{display:block;font-size:25px}.airport small{color:var(--muted)}.airport.right{text-align:right}.plane{text-align:center;color:var(--blue)}.efl-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.efl-stats div{background:#f5f8fa;border-radius:9px;padding:8px}.efl-stats small,.crew-row small{display:block;color:var(--muted);font-size:9px}.efl-stats b{font-size:12px}.flight-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.flight-buttons button{border:0;border-radius:10px;padding:11px;font-weight:800}.fp-btn{background:var(--blue);color:white}.ops-btn{background:#e8f1f8;color:var(--navy)}
.crew-list{margin-top:15px}.crew-row{display:grid;grid-template-columns:45px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #edf2f5}.rank-badge{width:38px;height:38px;border-radius:10px;background:var(--navy);color:white;display:grid;place-items:center;font-size:10px;font-weight:900}.crew-row b{font-size:13px}.crew-ftl{text-align:right;font-size:11px}
.filters{background:white;border:1px solid var(--line);border-radius:14px;padding:13px;display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end}.filters label{margin:0}.totals{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:14px 0}.total-card{background:white;border:1px solid var(--line);border-radius:14px;padding:14px}.total-card small{display:block;color:var(--muted);font-size:9px}.total-card b{font-size:20px}.log-row{background:white;border:1px solid var(--line);border-radius:12px;margin:8px 0;padding:12px;display:flex;justify-content:space-between}.log-row small{color:var(--muted)}
.back{border:0;background:transparent;color:var(--blue);font-weight:800;padding:6px 0 14px}.fp-head{background:white;border:1px solid var(--line);border-radius:16px;padding:15px}.fp-map{height:320px;border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:12px 0;background:#dfe9ef}.fp-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.fp-grid div{background:#f5f8fa;border-radius:9px;padding:10px}.fp-grid small{display:block;color:var(--muted);font-size:9px}.live-box{background:white;border:1px solid var(--line);border-radius:14px;margin-top:12px;padding:14px}.live-row{display:flex;justify-content:space-between;border-bottom:1px solid #edf2f5;padding:8px 0;font-size:12px}
.sheet{position:fixed;inset:0;background:#001d3355;z-index:50;display:flex;align-items:flex-end;justify-content:center}.sheet-card{background:white;width:min(680px,100%);max-height:82vh;overflow:auto;border-radius:20px 20px 0 0;padding:18px;position:relative}.sheet-close{position:absolute;right:13px;top:10px;border:0;background:#edf2f5;border-radius:50%;width:36px;height:36px;font-size:20px}.sheet h3{margin-top:4px}.sick-confirm{background:#fff7e6;border:1px solid #efd49a;border-radius:11px;padding:12px;font-size:12px}.toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:#102f49;color:white;border-radius:10px;padding:11px 14px;z-index:80;display:none;max-width:90vw}
@media(max-width:560px){main{padding:14px 10px 60px}.topbar{height:58px}.logout{font-size:11px}.quick-grid{gap:9px}.quick-grid button{min-height:112px;padding:14px}.page-head{align-items:center}.page-head h2{font-size:24px}.filters{grid-template-columns:1fr 1fr}.filters .primary{grid-column:1/-1}.efl-stats{grid-template-columns:repeat(2,1fr)}.fp-map{height:270px}.cal-cell{min-height:67px;padding:4px}.cal-chip{font-size:8px;padding:4px 2px}.totals{grid-template-columns:1fr}}

.source-duty{display:flex;justify-content:space-between;align-items:center;border-radius:9px;padding:9px 10px;margin:0 0 12px;font-size:11px}.source-duty.HSBY{background:#d7efff;color:#07537f}.source-duty.AD{background:#dce4ff;color:#303f9f}.source-duty span{font-weight:800}.nonflight-time{display:flex;align-items:center;gap:10px;margin:2px 0 9px;font-size:16px}.nonflight-time span{font-size:10px;color:var(--muted);text-transform:uppercase}
