:root { --accent:#0f766e; --accent-2:#0d9488; --bg:#f1f5f9; --card:#fff; --fg:#0f172a; --muted:#64748b; --line:#e2e8f0; --ok:#16a34a; --busy:#dc2626; --away:#d97706; --off:#94a3b8; --r:14px; }
* { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; }
body { background:var(--bg); color:var(--fg); font-family:'Heebo','Assistant',system-ui,-apple-system,'Segoe UI',Arial,sans-serif; font-size:16px; line-height:1.45; min-height:100vh; }
[hidden] { display:none !important; }
a { color:var(--accent); }
button, input, select, textarea { font:inherit; color:inherit; }
input, select, textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; min-height:44px; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--accent); outline-offset:0; border-color:transparent; }
input[type="color"] { padding:4px; height:44px; }
input[type="time"] { direction:ltr; text-align:center; }
label { display:block; font-size:14px; font-weight:500; color:var(--muted); margin-bottom:4px; }
.field { margin-bottom:12px; }
.row { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.row > * { flex:1; min-width:120px; }
.row > .auto { flex:0 0 auto; min-width:0; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:10px 16px; border:0; border-radius:10px; background:var(--accent); color:#fff; font-weight:700; cursor:pointer; white-space:nowrap; }
.btn:active { transform:translateY(1px); }
.btn.ghost { background:#fff; color:var(--fg); border:1px solid var(--line); }
.btn.danger { background:#fff; color:var(--busy); border:1px solid #fecaca; }
.btn.sm { min-height:36px; padding:6px 12px; font-size:14px; }
.btn.block { width:100%; }
.btn[disabled] { opacity:.5; cursor:default; }

.login { max-width:380px; margin:12vh auto; padding:24px; background:var(--card); border-radius:var(--r); box-shadow:0 8px 30px rgba(15,23,42,.08); }
.login h1 { font-size:24px; margin-bottom:4px; color:var(--accent); }
.login p { color:var(--muted); margin-bottom:20px; font-size:14px; }
.err { color:var(--busy); font-size:14px; min-height:20px; margin:6px 0; }

.shell { max-width:900px; margin:0 auto; padding:0 14px 90px; }
.topbar { position:sticky; top:0; z-index:5; background:var(--accent); color:#fff; margin:0 -14px 14px; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.topbar h1 { font-size:18px; font-weight:700; }
.topbar .sub { font-size:12px; opacity:.85; }
.topbar select { width:auto; min-height:36px; padding:6px 10px; border-radius:8px; background:#fff; color:var(--fg); font-size:14px; }
.nav { position:fixed; bottom:0; right:0; left:0; z-index:5; background:#fff; border-top:1px solid var(--line); display:flex; justify-content:space-around; padding:6px 0 max(6px, env(safe-area-inset-bottom)); }
.nav button { flex:1; background:none; border:0; padding:6px 0; font-size:12px; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:2px; min-height:48px; }
.nav button .ic { font-size:20px; line-height:1; }
.nav button.on { color:var(--accent); font-weight:700; }
@media (min-width:720px) { .nav { position:sticky; top:58px; bottom:auto; border-top:0; border-bottom:1px solid var(--line); margin:0 -14px 16px; } .shell { padding-bottom:30px; } }

.card { background:var(--card); border-radius:var(--r); padding:14px 16px; margin-bottom:12px; box-shadow:0 1px 2px rgba(15,23,42,.05); }
.card h2 { font-size:17px; margin-bottom:10px; }
.card h3 { font-size:15px; margin:14px 0 8px; color:var(--muted); font-weight:700; }
.card.tap { cursor:pointer; }
.card.tap:active { background:#f8fafc; }
.list-head { display:flex; justify-content:space-between; align-items:center; margin:6px 0 12px; }
.list-head h2 { font-size:20px; }
.empty-state { text-align:center; color:var(--muted); padding:30px 10px; }

.room-card { display:flex; gap:14px; align-items:center; }
.room-num { flex:0 0 58px; height:58px; border-radius:12px; background:var(--accent); color:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; }
.room-num small { font-size:11px; opacity:.85; } .room-num b { font-size:24px; }
.room-body { flex:1; min-width:0; }
.room-body .who { font-size:17px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.room-body .what { font-size:14px; color:var(--muted); }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.chip { font-size:12px; padding:2px 9px; border-radius:99px; background:#e2e8f0; color:var(--fg); font-weight:500; }
.chip.available { background:#dcfce7; color:#166534; } .chip.busy { background:#fee2e2; color:#991b1b; } .chip.away { background:#fef3c7; color:#92400e; }
.chip.src { background:#f1f5f9; color:var(--muted); }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--off); vertical-align:middle; margin-inline-end:4px; }
.dot.on { background:var(--ok); box-shadow:0 0 0 3px rgba(22,163,74,.2); }

.pills { display:flex; gap:6px; flex-wrap:wrap; }
.pills button { flex:1; min-height:44px; border:1px solid var(--line); background:#fff; border-radius:10px; font-weight:500; }
.pills button.on { border-color:var(--accent); background:#ecfdf5; color:var(--accent); font-weight:700; }

.preview { border:2px dashed var(--line); border-radius:12px; padding:16px; text-align:center; background:#f8fafc; }
.preview .t { color:var(--accent); font-size:14px; } .preview .n { font-size:26px; font-weight:900; } .preview .s { color:var(--muted); }
.preview .st { display:inline-block; margin-top:8px; padding:3px 12px; border-radius:99px; color:#fff; font-size:13px; font-weight:700; background:var(--off); }
.preview .st.available { background:var(--ok); } .preview .st.busy { background:var(--busy); } .preview .st.away { background:var(--away); }

.sched-day { border-top:1px solid var(--line); padding:8px 0; }
.sched-day h4 { font-size:14px; color:var(--muted); margin-bottom:4px; }
.sched-entry { display:flex; align-items:center; gap:8px; padding:4px 0; font-size:15px; }
.sched-entry .time { direction:ltr; font-variant-numeric:tabular-nums; color:var(--muted); flex:0 0 100px; }
.sched-entry .doc { flex:1; }
.sched-entry button { background:none; border:0; color:var(--busy); font-size:18px; min-width:36px; min-height:36px; }

.code-box { font-size:32px; font-weight:900; letter-spacing:.2em; direction:ltr; text-align:center; background:#ecfdf5; color:var(--accent); border-radius:10px; padding:8px; margin:8px 0; }
.meta { font-size:13px; color:var(--muted); }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.actions .btn { flex:1; }

.sheet-bg { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:20; display:flex; align-items:flex-end; justify-content:center; }
.sheet { background:var(--bg); width:100%; max-width:700px; max-height:92vh; overflow:auto; border-radius:18px 18px 0 0; padding:14px 14px 30px; }
.sheet-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.sheet-head h2 { font-size:20px; }
.sheet-head button { background:none; border:0; font-size:26px; min-width:44px; min-height:44px; color:var(--muted); }
@media (min-width:720px) { .sheet-bg { align-items:center; } .sheet { border-radius:18px; } }

.toast { position:fixed; bottom:80px; left:50%; transform:translateX(-50%); background:var(--fg); color:#fff; padding:10px 18px; border-radius:99px; font-size:14px; z-index:50; box-shadow:0 6px 20px rgba(0,0,0,.2); max-width:90vw; }
.toast.err { background:var(--busy); }
table { width:100%; border-collapse:collapse; font-size:14px; }
td, th { padding:8px 6px; border-bottom:1px solid var(--line); text-align:right; }
