:root { --bg:#0f1216; --card:#1a1f27; --fg:#e6e9ee; --muted:#8a93a2; --accent:#3b82f6; --green:#16a34a; --gray:#6b7280; --red:#ef4444; --border:#2a313c; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
#app { max-width:880px; margin:0 auto; padding:24px 16px 60px; }
h1 { font-size:20px; margin:0; } h3 { margin:0 0 8px; }
.muted { color:var(--muted); font-size:13px; }
.err { color:var(--red); font-size:13px; }
.card { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:18px; margin:14px 0; }
.card.narrow { max-width:360px; margin:60px auto; }
input { width:100%; background:#11151b; border:1px solid var(--border); color:var(--fg); border-radius:8px; padding:10px; margin:6px 0; font:inherit; }
input[type=time] { width:auto; margin:0; } input[type=checkbox] { width:auto; margin:0; }
button { cursor:pointer; border:1px solid var(--border); background:#222936; color:var(--fg); border-radius:8px; padding:8px 14px; font-size:14px; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; width:100%; margin-top:8px; }
button.ghost { background:transparent; }
button.sel { background:var(--accent); border-color:var(--accent); color:#fff; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.topbar > div { display:flex; gap:10px; align-items:center; }
.tabs { display:flex; gap:6px; margin:16px 0 0; }
.tabs button.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.badge { font-size:11px; font-weight:700; padding:3px 8px; border-radius:6px; letter-spacing:.04em; }
.badge.live { background:var(--green); color:#fff; } .badge.dry { background:var(--gray); color:#fff; }
.pill { font-size:12px; font-weight:700; padding:4px 10px; border-radius:20px; }
.pill.on { background:rgba(22,163,74,.2); color:#4ade80; } .pill.off { background:rgba(107,114,128,.2); color:#9ca3af; }
.statusline { display:flex; gap:10px; align-items:center; margin-bottom:6px; }
.modeToggle { display:flex; gap:8px; align-items:center; margin-top:12px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--border); }
th { color:var(--muted); font-weight:600; }
table.hours td { border:none; padding:5px 10px 5px 0; }
.chk { display:inline-flex; gap:6px; align-items:center; font-size:13px; color:var(--muted); }
.actions { display:flex; gap:12px; align-items:center; margin-top:14px; }
/* unavailability calendar */
.cal-head { display:flex; align-items:center; justify-content:center; gap:18px; margin-bottom:4px; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal-grid.head { margin:10px 0 2px; }
.cal-dow { text-align:center; color:var(--muted); font-size:11px; font-weight:600; }
.cal-cell { min-height:62px; background:#11151b; border:1px solid var(--border); border-radius:8px; padding:4px; cursor:pointer; }
.cal-cell.blank { background:transparent; border:none; cursor:default; }
.cal-cell.past { opacity:.45; }
.cal-cell.today { border-color:var(--accent); }
.cal-cell:hover:not(.blank) { border-color:var(--accent); }
.cal-num { font-size:12px; color:var(--muted); }
.cal-bar { height:5px; border-radius:3px; background:var(--accent); margin-top:3px; opacity:.85; }
.cal-more { font-size:10px; color:var(--muted); margin-top:2px; }
.overlay { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:50; }
.modal { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:16px; width:400px; max-width:94vw; max-height:92vh; display:flex; flex-direction:column; }
.modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.timeline-wrap { overflow-y:auto; max-height:60vh; border:1px solid var(--border); border-radius:8px; margin:8px 0; background:#0d1117; }
.timeline { position:relative; margin-left:46px; touch-action:none; }
.tl-hour { position:absolute; left:0; right:0; border-top:1px solid var(--border); pointer-events:none; }
.tl-hour span { position:absolute; left:-44px; top:-7px; font-size:10px; color:var(--muted); width:40px; text-align:right; }
.tl-block { position:absolute; left:4px; right:8px; min-height:11px; background:rgba(59,130,246,.35); border:1px solid var(--accent); border-radius:5px; cursor:move; touch-action:none; }
.tl-label { font-size:10px; padding:1px 5px; color:#cfe0ff; pointer-events:none; white-space:nowrap; overflow:hidden; }
.tl-top,.tl-bot { position:absolute; left:0; right:0; height:8px; cursor:ns-resize; }
.tl-top { top:-1px; } .tl-bot { bottom:-1px; }
.tl-x { position:absolute; top:1px; right:1px; width:15px; height:15px; padding:0; line-height:13px; font-size:9px; text-align:center; border-radius:4px; background:rgba(0,0,0,.45); border:none; color:#fff; cursor:pointer; }
.cal-top { display:flex; justify-content:space-between; align-items:center; }
.cal-toggle { width:16px; height:16px; padding:0; border-radius:50%; font-size:8px; line-height:14px; text-align:center; background:transparent; border:1px solid var(--border); color:var(--muted); opacity:0; transition:opacity .1s; }
.cal-cell:hover .cal-toggle { opacity:.65; }
.cal-toggle:hover { opacity:1; }
.cal-toggle.on { background:var(--accent); border-color:var(--accent); color:#fff; opacity:1; }
.cal-cell.blocked { background:rgba(59,130,246,.18); border-color:var(--accent); }
.cal-allday-label { font-size:11px; color:#9cc2ff; font-weight:600; margin-top:8px; }
.allday-toggle { display:flex; gap:8px; align-items:center; font-size:14px; font-weight:600; padding:9px 11px; background:#11151b; border:1px solid var(--border); border-radius:8px; margin:6px 0; cursor:pointer; }
