/* TechHub — plain, readable, thumb-friendly. No framework. */
:root{
  --bg:#f4f5f7; --card:#fff; --ink:#1d2330; --muted:#667085; --line:#e3e6eb;
  --brand:#0b5cad; --brand-ink:#fff;
  --ok:#e7f6ec; --ok-ink:#17663a; --warn:#fff4e0; --warn-ink:#8a5300; --bad:#fdecec; --bad-ink:#a3161a;
  --radius:10px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink)}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:1.4rem;margin:.2rem 0 1rem}
h2{font-size:1.1rem;margin:0 0 .6rem}
small,.muted{color:var(--muted)}

/* top bar + nav */
.topbar{position:sticky;top:0;z-index:10;background:var(--brand);color:var(--brand-ink)}
.topbar .row{display:flex;align-items:center;justify-content:space-between;padding:.55rem 1rem;max-width:1200px;margin:0 auto}
.topbar .brand{color:#fff;font-weight:700;font-size:1.1rem}
.topbar .who{font-size:.85rem;opacity:.9}
.topbar .who a{color:#fff;text-decoration:underline}
.nav{display:flex;gap:.25rem;overflow-x:auto;padding:0 .75rem .5rem;max-width:1200px;margin:0 auto;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav a{flex:0 0 auto;color:#fff;padding:.45rem .8rem;border-radius:999px;font-size:.95rem;white-space:nowrap}
.nav a.on{background:rgba(255,255,255,.22);font-weight:600}
.nav a:hover{text-decoration:none;background:rgba(255,255,255,.14)}
.count{display:inline-block;min-width:1.3em;padding:0 .35em;border-radius:999px;background:#ffb020;color:#1d2330;font-size:.75rem;font-weight:700;text-align:center;margin-left:.25rem}

main{max-width:1200px;margin:0 auto;padding:1rem}
.grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}
.card > :last-child{margin-bottom:0}
.stat{font-size:2rem;font-weight:700;line-height:1.1}
.list{list-style:none;margin:0;padding:0}
.list li{padding:.6rem 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:.5rem;align-items:center}
.list li:last-child{border-bottom:0}

/* buttons & forms */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.5rem 1rem;border-radius:8px;border:1px solid var(--brand);background:var(--brand);color:#fff;font:inherit;font-weight:600;cursor:pointer}
.btn:hover{text-decoration:none;filter:brightness(1.08)}
.btn.ghost{background:#fff;color:var(--brand)}
.btn.green{background:#1f8a4c;border-color:#1f8a4c}
.btn.red{background:#c62828;border-color:#c62828}
.btn.sm{min-height:36px;padding:.3rem .7rem;font-size:.9rem}
.actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.75rem 0}
form p{margin:0 0 .9rem}
label{display:block;font-weight:600;margin-bottom:.25rem}
input[type=text],input[type=password],input[type=date],input[type=search],input[type=url],select,textarea{
  width:100%;min-height:44px;padding:.5rem .65rem;border:1px solid #c9ced6;border-radius:8px;font:inherit;background:#fff}
.helptext{display:block;color:var(--muted);font-size:.85rem}
.errorlist{color:var(--bad-ink);margin:.2rem 0;padding-left:1.1rem}
.search{display:flex;gap:.5rem;margin-bottom:1rem}
.search input{flex:1}

/* messages */
.msg{padding:.7rem 1rem;border-radius:8px;margin-bottom:.75rem;background:var(--ok);color:var(--ok-ink)}
.msg.info{background:#eaf2fb;color:#0b4a8a}
.msg.error,.msg.warning{background:var(--bad);color:var(--bad-ink)}

/* badges */
.badge{display:inline-block;padding:.1rem .5rem;border-radius:999px;font-size:.8rem;font-weight:600;background:#eef0f3;color:#344054;white-space:nowrap}
.badge.pending{background:var(--warn);color:var(--warn-ink)}
.badge.approved,.badge.ok{background:var(--ok);color:var(--ok-ink)}
.badge.denied,.badge.bad{background:var(--bad);color:var(--bad-ink)}
.badge.cancelled{background:#eef0f3;color:var(--muted)}

/* tables */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--radius);background:#fff}
table{border-collapse:collapse;width:100%}
th,td{padding:.55rem .6rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{background:#f8f9fb;font-size:.85rem;color:#475467;white-space:nowrap}
tr:last-child td{border-bottom:0}

/* weekly schedule grid */
.sched th.today,.sched td.today{box-shadow:inset 0 0 0 2px var(--brand)}
.sched td.route,.sched th.route{position:sticky;left:0;background:#fff;z-index:1;min-width:92px;border-right:1px solid var(--line)}
.sched th.route{background:#f8f9fb}
.sched td.cell{padding:0}
.sched td.cell a,.sched td.cell span.c{display:block;padding:.6rem .5rem;min-height:48px;color:inherit;font-size:.9rem}
.sched td.cell a:hover{text-decoration:none;filter:brightness(.96)}
.sched{table-layout:fixed;min-width:820px}
.sched th.route{width:104px}
.cell.ok{background:#dcf2e3}
.cell.open{background:#ffe7b8;color:#7a4a00}
.cell.off{background:#fbd5d5;color:#8f1418}
.cell.none{background:#fafbfc;color:#b0b6bf}
.cell.mine{outline:3px solid var(--brand);outline-offset:-3px;font-weight:700}
.sched tfoot td{font-size:.8rem;color:var(--muted);background:#fafbfc}
.legend{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.85rem;margin:.5rem 0 1rem}
.legend i{display:inline-block;width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:.3rem}
.weeknav{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.5rem}
.weeknav strong{margin:0 .5rem}

/* manual */
.langs{display:flex;gap:.5rem;margin-bottom:1rem}
.article{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.25rem;max-width:860px}
.article h3{margin-top:1.6rem;padding-top:.6rem;border-top:1px solid var(--line)}
.article h3:first-child{margin-top:0;border-top:0}
.article table{margin:.8rem 0;font-size:.95rem;display:block;overflow-x:auto}
.article th,.article td{border:1px solid var(--line)}
.article blockquote{margin:1rem 0;padding:.6rem .9rem;background:#fff8e6;border-left:4px solid #f0a500;border-radius:6px}
.article blockquote p{margin:0}
.article li{margin:.25rem 0}

.secret{font:1.4rem/1.3 ui-monospace,Menlo,Consolas,monospace;background:#f4f5f7;padding:.6rem .8rem;border-radius:8px;word-break:break-all;user-select:all}

@media (max-width:600px){
  main{padding:.75rem}
  h1{font-size:1.25rem}
  .hide-sm{display:none}
  .card{padding:.85rem}
}
