:root {
  --bg: #f8fafc; --card: #fff; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line2: #f1f5f9; --red: #ef4444; --red-d: #dc2626; --red-50: #fef2f2;
  --green: #16a34a; --green-50: #f0fdf4; --green-100: #dcfce7; --amber: #d97706; --amber-50: #fffbeb; --amber-100: #fef3c7;
  --blue: #2563eb; --blue-50: #eff6ff; --violet: #7c3aed;
  --ck: #4338ca; --ck-bg: #eef2ff; --dd: #b45309; --dd-bg: #fef3c7; --bw: #15803d; --bw-bg: #dcfce7;
  --r: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.06);
  --top: 56px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
.boot { padding: 80px 20px; text-align: center; color: var(--muted); }

/* ---------- top bar ---------- */
#devbar { background: repeating-linear-gradient(45deg, #fde68a, #fde68a 12px, #fcd34d 12px, #fcd34d 24px); color: #78350f; font-size: 12px; font-weight: 600; text-align: center; padding: 4px 12px; }
#devbar b { font-weight: 800; }
#devbar button { margin-left: 8px; font-size: 11px; padding: 1px 8px; border-radius: 6px; border: 1px solid #b45309; background: #fff7ed; cursor: pointer; }
header#top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 18px; background: #111827; color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #ef4444, #b91c1c); display: grid; place-items: center; font-weight: 800; font-size: 12px; letter-spacing: .02em; }
.brand-text { font-size: 15px; color: #cbd5e1; } .brand-text b { color: #fff; }
#nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
#nav a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
#nav a:hover { background: #1f2937; color: #fff; }
#nav a.on { background: #fff; color: #111827; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
#nav a.on .badge { background: var(--red); }
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #374151; background: #1f2937; color: #fff; font-weight: 800; cursor: pointer; }
.icon-btn:hover { background: #374151; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid #374151; background: #1f2937; color: #fff; border-radius: 20px; padding: 3px 12px 3px 3px; cursor: pointer; font-weight: 600; font-size: 13px; }
.usermenu { position: relative; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: #64748b; flex: none; }
.menu { position: absolute; z-index: 80; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.18); padding: 6px; min-width: 220px; }
#userMenu { right: 0; top: 40px; }
.menu .mi { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.menu .mi:hover { background: var(--line2); }
.menu .mi.danger { color: var(--red-d); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu .mh { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 2px; }
.menu select { width: 100%; margin: 4px 0; }

/* ---------- layout ---------- */
main#app { max-width: 1480px; margin: 0 auto; padding: 20px 18px 90px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.page-h .sub { color: var(--muted); margin-top: 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card h2 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.b { font-weight: 700; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
hr.sep { border: 0; height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { border-color: #cbd5e1; background: var(--line2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-d); border-color: var(--red-d); color: #fff; }
.btn-dark { background: #111827; border-color: #111827; color: #fff; }
.btn-dark:hover { background: #1f2937; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #15803d; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line2); }
.btn-danger { color: var(--red-d); border-color: #fecaca; }
.btn-danger:hover { background: var(--red-50); border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 18px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.seg { display: inline-flex; background: var(--line2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.team-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 4px; }
label.f > em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #fecaca; border-color: var(--red); }
textarea { min-height: 80px; resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-toggle { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.chip-toggle.on { background: #111827; color: #fff; border-color: #111827; }
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 12px; cursor: pointer; transition: .15s; }
.toggle i::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(18px); }
.warn { background: var(--amber-50); border: 1px solid #fcd34d; color: #92400e; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.bad { background: var(--red-50); border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.good { background: var(--green-50); border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.info { background: var(--blue-50); border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line2); color: var(--ink2); }
.pill.green { background: var(--green-100); color: #166534; }
.pill.amber { background: var(--amber-100); color: #92400e; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.blue { background: #dbeafe; color: #1e40af; }
.pill.dark { background: #111827; color: #fff; }
.ch { font-size: 10px; font-weight: 800; letter-spacing: .03em; border-radius: 5px; padding: 1px 5px; display: inline-block; line-height: 1.4; }
.ch-CK { background: var(--ck-bg); color: var(--ck); } .ch-DD { background: var(--dd-bg); color: var(--dd); } .ch-BW { background: var(--bw-bg); color: var(--bw); }
.ch-SMK, .ch-SM { background: #f3e8ff; color: #6b21a8; }

/* ---------- home ---------- */
.hello { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.todo { display: flex; flex-direction: column; gap: 10px; }
.todo-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.todo-item .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex: none; }
.todo-item .t { font-weight: 700; } .todo-item .d { color: var(--muted); font-size: 13px; }
.todo-item.done { opacity: .75; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.step { padding: 14px; border-radius: 12px; background: var(--line2); }
.step .n { width: 24px; height: 24px; border-radius: 50%; background: #111827; color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.step b { display: block; margin-bottom: 2px; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; }
.stat .v { font-size: 22px; font-weight: 800; } .stat .l { font-size: 12px; color: var(--muted); }

/* ---------- schedule toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.weeknav { display: flex; align-items: center; gap: 4px; }
.weeknav .lbl { font-weight: 800; font-size: 16px; min-width: 170px; text-align: center; }
.arrow { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; font-weight: 700; }
.arrow:hover { background: var(--line2); }
.unsent-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; margin-bottom: 12px; font-weight: 600; flex-wrap: wrap; }
.unsent-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #f97316; flex: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 10px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid transparent; }

/* ---------- week grid ---------- */
.sched-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.sched { display: grid; min-width: 1060px; }
.sched .hc { position: sticky; top: 0; z-index: 3; background: #f8fafc; border-bottom: 1px solid var(--line); padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.sched .hc:hover { color: var(--ink); }
.sched .hc .dnum { font-size: 17px; color: var(--ink); font-weight: 800; margin-right: 4px; }
.sched .hc.today { background: #fff1f2; } .sched .hc.today .dnum { color: var(--red); }
.sched .hc.first { position: sticky; left: 0; z-index: 4; cursor: default; }
.sched .pc { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line2); padding: 8px 10px; display: flex; align-items: center; gap: 8px; min-height: 64px; }
.sched .pc .nm { font-weight: 700; font-size: 13px; line-height: 1.2; }
.sched .pc .meta { font-size: 11px; color: var(--muted); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.sched .pc.section { background: #f8fafc; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-height: 0; }
.sched .dc { border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); padding: 5px; min-height: 64px; position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.sched .dc.today { background: #fffafa; }
.sched .dc:hover .addhint { opacity: 1; }
.sched .dc.drop { outline: 2px dashed var(--red); outline-offset: -3px; background: var(--red-50); }
.addhint { opacity: 0; transition: opacity .1s; position: absolute; right: 5px; bottom: 4px; font-size: 11px; font-weight: 700; color: var(--red); }
.av { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 6px; line-height: 1.35; }
.av.yes { background: var(--green-50); color: #15803d; border: 1px solid #bbf7d0; }
.av.no { background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 5px, #e2e8f0 5px, #e2e8f0 10px); color: var(--muted); }
.av.unk { color: var(--faint); font-weight: 500; font-style: italic; }
.sh { border-radius: 7px; padding: 4px 7px; font-size: 12px; font-weight: 700; line-height: 1.3; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teamc, #64748b); cursor: grab; user-select: none; position: relative; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.sh:hover { border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(15,23,42,.1); }
.sh .tm { white-space: nowrap; }
.sh .sub2 { font-size: 11px; font-weight: 600; color: var(--muted); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sh.unsent::after { content: ''; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #f97316; border: 2px solid #fff; }
.sh.removed { opacity: .55; text-decoration: line-through; border-style: dashed; cursor: default; }
.sh.warn-out { background: var(--amber-50); }
.sh.warn-bad { background: #fff1f2; border-color: #fecaca; }
.sh.open { border-style: dashed; background: #f8fafc; }
.sh.dragging { opacity: .4; }
.flag { font-size: 10px; font-weight: 800; border-radius: 4px; padding: 0 4px; }
.flag.req { background: #fee2e2; color: #b91c1c; }
.flag.ok { background: var(--green-100); color: #166534; }
.show-card { border-radius: 8px; padding: 5px 7px; font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--line); cursor: pointer; line-height: 1.3; }
.show-card:hover { box-shadow: 0 2px 6px rgba(15,23,42,.1); }
.show-card.needs { border: 1.5px solid var(--red); background: var(--red-50); }
.show-card.cancelled { opacity: .5; text-decoration: line-through; }
.show-card .hosts { font-size: 11px; color: var(--muted); font-weight: 600; }
.show-card .needs-t { color: var(--red-d); font-size: 11px; font-weight: 800; }
.sched .fc { background: #f8fafc; border-top: 1px solid var(--line); padding: 6px 10px; font-size: 11px; color: var(--muted); font-weight: 600; }
.sched .fc.first { position: sticky; left: 0; z-index: 2; font-weight: 800; color: var(--ink2); }

/* ---------- day timeline ---------- */
.tl { position: relative; overflow-x: auto; }
.tl-inner { position: relative; min-width: 900px; }
.tl-hours { display: flex; margin-left: 170px; border-bottom: 1px solid var(--line); }
.tl-hours div { flex: 1; font-size: 10px; color: var(--muted); padding: 4px 0 4px 3px; border-left: 1px solid var(--line2); }
.tl-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line2); min-height: 40px; }
.tl-row .who { width: 170px; flex: none; padding: 8px 10px; font-weight: 700; font-size: 13px; border-right: 1px solid var(--line); background: #fff; position: sticky; left: 0; z-index: 1; }
.tl-row .lane { position: relative; flex: 1; background-image: linear-gradient(to right, var(--line2) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.tl-bar { position: absolute; top: 6px; bottom: 6px; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 3px 6px; overflow: hidden; white-space: nowrap; cursor: pointer; color: #fff; }
.tl-av { position: absolute; top: 2px; bottom: 2px; background: var(--green-100); border-radius: 4px; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 2; }

/* ---------- summary table ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #f8fafc; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- availability ---------- */
.progress { height: 10px; border-radius: 6px; background: var(--line2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.avail-day { display: grid; grid-template-columns: 120px 150px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.avail-day:last-child { border-bottom: 0; }
.avail-day .dl { font-weight: 800; } .avail-day .dl small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.avail-day.off .wins { opacity: .45; }
.win { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.win select { width: auto; min-width: 104px; padding: 7px 8px; }
.win .x { border: 0; background: none; color: var(--faint); font-size: 18px; cursor: pointer; padding: 0 4px; }
.win .x:hover { color: var(--red); }
.on-air { font-size: 12px; color: var(--muted); margin-top: 4px; }
.over { font-size: 12px; color: var(--violet); font-weight: 700; }
.daytog { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.daytog button { border: 0; background: #fff; padding: 8px 12px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--muted); }
.daytog button.y.on { background: var(--green); color: #fff; }
.daytog button.n.on { background: #475569; color: #fff; }
.week-h { padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.agrid { display: grid; min-width: 980px; }
.agrid > div { border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); padding: 5px 6px; font-size: 11px; min-height: 38px; }
.agrid .ah { background: #f8fafc; font-weight: 700; color: var(--muted); position: sticky; top: 0; }
.agrid .an { font-weight: 700; font-size: 12px; position: sticky; left: 0; background: #fff; z-index: 1; }

/* ---------- requests ---------- */
.req { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line2); align-items: center; }
.req:last-child { border-bottom: 0; }
.req .what { font-weight: 700; }
.req .ba { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 13px; }
.req .ba .from { text-decoration: line-through; color: var(--muted); }
.req .ba .to { color: #166534; font-weight: 700; }

/* ---------- my schedule (member, phone-first) ---------- */
.my-day { margin-bottom: 14px; }
.my-day .dh { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 6px; }
.my-shift { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teamc, #64748b); margin-bottom: 8px; }
.my-shift .tm { font-size: 17px; font-weight: 800; }
.my-shift .inf { font-size: 13px; color: var(--muted); }
.callout { border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.callout.red { background: linear-gradient(135deg, #fef2f2, #fff); border: 1px solid #fecaca; }
.callout.green { background: var(--green-50); border: 1px solid #bbf7d0; }
.callout.blue { background: var(--blue-50); border: 1px solid #bfdbfe; }
.callout .ci { font-size: 26px; }
.callout .ct { font-weight: 800; font-size: 15px; }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.choice:hover { border-color: var(--red); background: var(--red-50); }
.choice .ci { font-size: 22px; width: 32px; text-align: center; }
.choice b { display: block; } .choice span { color: var(--muted); font-size: 13px; }

/* ---------- drawer / modal / toast ---------- */
#scrim { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 60; }
#drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 70; box-shadow: -12px 0 40px rgba(15,23,42,.2); display: flex; flex-direction: column; animation: slidein .16s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-h { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.dr-h h3 { font-size: 17px; font-weight: 800; flex: 1; }
.dr-b { padding: 18px; overflow-y: auto; flex: 1; }
.dr-f { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; background: #f8fafc; }
.x-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--line2); cursor: pointer; font-size: 18px; color: var(--muted); }
.x-btn:hover { background: var(--line); color: var(--ink); }
#modalWrap { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; display: grid; place-items: center; padding: 16px; }
#modal { background: #fff; border-radius: 16px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(15,23,42,.3); }
#modal .mh2 { padding: 18px 20px 6px; font-size: 18px; font-weight: 800; }
#modal .mb { padding: 8px 20px 16px; color: var(--ink2); }
#modal .mf { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: #f8fafc; border-radius: 0 0 16px 16px; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #111827; color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
#toast.err { background: #b91c1c; }
#ctxmenu { position: fixed; }
.person-pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.person-pick .pp { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.person-pick .pp:last-child { border-bottom: 0; }
.person-pick .pp:hover { background: #f8fafc; }
.person-pick .pp.sel { background: #fff1f2; box-shadow: inset 3px 0 0 var(--red); }
.roles-t { width: 100%; border-collapse: collapse; }
.roles-t td, .roles-t th { padding: 8px 6px; border-bottom: 1px solid var(--line2); text-align: center; font-size: 13px; }
.roles-t td:first-child, .roles-t th:first-child { text-align: left; }
.roles-t th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- login ---------- */
.login { max-width: 400px; margin: 8vh auto 0; text-align: center; }
.login .logo-big { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; background: linear-gradient(135deg, #ef4444, #991b1b); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(239,68,68,.35); }
.login h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.login .card { padding: 22px; text-align: left; margin-top: 22px; }
.login input { font-size: 18px; padding: 12px 14px; text-align: center; letter-spacing: .04em; }

/* ---------- help ---------- */
.help h4 { font-size: 14px; font-weight: 800; margin: 14px 0 4px; }
.help p, .help li { color: var(--ink2); font-size: 14px; }
.help ul { padding-left: 18px; }

/* ---------- phones ---------- */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
#tabbar a { flex: 1; text-align: center; padding: 8px 2px 7px; font-size: 11px; font-weight: 700; color: var(--muted); position: relative; }
#tabbar a .ti { display: block; font-size: 20px; line-height: 1.2; }
#tabbar a.on { color: var(--red); }
#tabbar a .badge { position: absolute; top: 3px; left: calc(50% + 6px); }
@media (max-width: 860px) {
  #nav { display: none; }
  .brand-text { display: none; }
  header#top { gap: 10px; }
  main#app { padding: 14px 12px 96px; }
  .page-h h1 { font-size: 21px; }
  .avail-day { grid-template-columns: 1fr; gap: 8px; }
  .two, .three { grid-template-columns: 1fr 1fr; }
  .weeknav .lbl { min-width: 0; font-size: 14px; }
  .user-btn .un { display: none; }
  .user-btn { padding: 3px; }
}
@media (min-width: 861px) { #tabbar { display: none !important; } }
