:root{
  --bg:#0f172a; --panel:#1e293b; --panel2:#273449; --line:#334155;
  --text:#e2e8f0; --muted:#94a3b8; --accent:#38bdf8; --danger:#ef4444; --ok:#22c55e; --warn:#f59e0b;
  --radius:14px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--text);font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#app{max-width:680px;margin:0 auto;min-height:100%;display:flex;flex-direction:column}
h1,h2,h3{margin:0 0 .5rem}
button{font:inherit;cursor:pointer;border:0;border-radius:10px;padding:.65rem 1rem;background:var(--accent);color:#04263a;font-weight:600}
button.ghost{background:var(--panel2);color:var(--text)}
button.danger{background:var(--danger);color:#fff}
button.sm{padding:.4rem .7rem;font-size:.85rem;border-radius:8px}
button:disabled{opacity:.45}
input,select,textarea{font:inherit;width:100%;padding:.6rem .7rem;border-radius:10px;border:1px solid var(--line);
  background:var(--panel);color:var(--text);margin:.25rem 0 .8rem}
label{font-size:.82rem;color:var(--muted)}
a{color:var(--accent)}
.row{display:flex;gap:.5rem;align-items:center}
.spread{justify-content:space-between}
.muted{color:var(--muted)}
.pad{padding:1rem}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);margin:.7rem 0;overflow:hidden}
.card .hd{padding:.7rem 1rem;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.badge{font-size:.7rem;padding:.15rem .5rem;border-radius:999px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.badge.booked{background:#0ea5e933;color:#7dd3fc}
.badge.pending{background:#f59e0b33;color:#fcd34d}
.badge.approved{background:#22c55e33;color:#86efac}

/* top bar */
.topbar{position:sticky;top:0;z-index:5;background:var(--panel);border-bottom:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;padding:.7rem 1rem}
.topbar .who{font-size:.8rem;color:var(--muted)}
.datebar{display:flex;justify-content:space-between;align-items:center;gap:.5rem;padding:.6rem 1rem;position:sticky;top:54px;background:var(--bg);z-index:4}
.datebar .d{font-weight:700}

/* day grid */
.space .hd .loc{font-size:.72rem;color:var(--muted)}
.slots{display:flex;flex-direction:column}
.slot{display:flex;align-items:stretch;border-top:1px solid #1f2a3d;min-height:34px}
.slot .t{width:64px;flex:0 0 64px;font-size:.72rem;color:var(--muted);padding:.3rem .4rem;border-right:1px solid #1f2a3d}
.slot .body{flex:1;display:flex;align-items:center;padding:.15rem .4rem}
.slot.free .body{color:#475569}
.slot.free{cursor:pointer}
.slot.free:active{background:var(--panel2)}
.bk{flex:1;border-radius:8px;padding:.3rem .55rem;color:#fff;font-size:.82rem;display:flex;justify-content:space-between;align-items:center;gap:.4rem}
.bk .ttl{font-weight:600}
.bk .nm{opacity:.92}
.bk.cont{opacity:.55}

/* bottom nav */
.nav{position:sticky;bottom:0;display:flex;background:var(--panel);border-top:1px solid var(--line)}
.nav button{flex:1;background:none;color:var(--muted);border-radius:0;padding:.7rem;font-size:.78rem;font-weight:600}
.nav button.on{color:var(--accent)}

/* modal / sheet */
.sheet-bg{position:fixed;inset:0;background:#0008;display:flex;align-items:flex-end;justify-content:center;z-index:20}
.sheet{background:var(--panel);width:100%;max-width:680px;border-radius:18px 18px 0 0;padding:1rem 1rem 1.4rem;
  border-top:1px solid var(--line);max-height:90vh;overflow:auto}
.center{min-height:100%;display:flex;flex-direction:column;justify-content:center}
.err{color:#fca5a5;font-size:.85rem;min-height:1.1rem}
.ok{color:#86efac;font-size:.85rem}
.pill{display:inline-flex;align-items:center;gap:.4rem;background:var(--panel2);border-radius:999px;padding:.2rem .6rem;font-size:.8rem}
.dot{width:.7rem;height:.7rem;border-radius:50%;display:inline-block}
.list-item{padding:.7rem 1rem;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:.6rem;align-items:center}
.hint{font-size:.8rem;color:var(--warn);margin:.3rem 0}
