:root {
  --brand: #8c52ff;
  --brand-600: #6a3ff0;
  --brand-deep: #4e139b;
  --brand-50: #f3efff;
  --brand-100: #e7dfff;
  --ink: #1d1b26;
  --ink-2: #4a4760;
  --muted: #807c93;
  --line: #e8e5f0;
  --line-2: #f0eef6;
  --bg: #f7f6fb;
  --card: #ffffff;
  --red: #dc3545;
  --red-50: #fdecee;
  --amber: #c27c00;
  --amber-50: #fff6e0;
  --green: #15846e;
  --green-50: #e6f6f1;
  --blue: #2f6fe4;
  --blue-50: #e9f0fe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 27, 38, .05), 0 4px 16px rgba(29, 27, 38, .05);
  --shadow-lg: 0 12px 48px rgba(29, 27, 38, .18);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand-600); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 550; font-size: 13px; line-height: 1.2; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--line-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 11px 16px; font-size: 14px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #e9e1ff 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #efe9ff 0, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 32px; }
.login-card h1 { font-size: 22px; margin: 18px 0 6px; }
.login-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.code-input { letter-spacing: 10px; font-size: 22px; text-align: center; font-weight: 700; }
.dev-hint { background: var(--amber-50); color: var(--amber); padding: 8px 10px; border-radius: 8px; font-size: 12px; margin-bottom: 12px; }
.error { color: var(--red); font-size: 13px; margin: -4px 0 12px; min-height: 1em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 10px 6px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.brand img { display: block; width: 100%; max-width: 236px; height: auto; }
.brand .product { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--brand-deep); }
.brand .product::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--brand); }
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 6px; }
.login-product { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--brand-deep); margin-bottom: 18px; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; flex: none; }
.brand b { display: block; font-size: 14px; }
.brand span { display: block; font-size: 11px; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 550; }
.nav a:hover { background: var(--line-2); }
.nav a.active { background: var(--brand-50); color: var(--brand-600); }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.sidebar .spacer { flex: 1; }
.me-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-top: 1px solid var(--line); }
.me-card .grow b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .grow span { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(247, 246, 251, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; }
.topbar h1 { font-size: 20px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.content { padding: 8px 28px 48px; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; }

/* ---------- avatar & badges ---------- */
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.allocated { background: var(--blue-50); color: var(--blue); }
.pill.in_progress { background: var(--brand-50); color: var(--brand-600); }
.pill.roadblock { background: var(--red-50); color: var(--red); }
.pill.completed { background: var(--green-50); color: var(--green); }
.pill.red { background: var(--red-50); color: var(--red); }
.pill.amber { background: var(--amber-50); color: var(--amber); }
.pill.green { background: var(--green-50); color: var(--green); }
.pill.prio-urgent { background: var(--red); color: #fff; }
.pill.prio-high { background: var(--amber-50); color: var(--amber); }
.pill.prio-low { background: var(--line-2); color: var(--muted); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state.working { color: var(--green); }
.state.idle { color: var(--amber); }
.state.blocked { color: var(--red); }
.state.absent { color: #a6a2b6; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 650; font-size: 12px; }
.verified svg { width: 14px; height: 14px; }

/* ---------- cards / KPIs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 14px; }
.card-h .muted { font-size: 12px; }
.card-b { padding: 12px 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: default; }
.kpi[data-href] { cursor: pointer; }
.kpi[data-href]:hover { border-color: var(--brand-100); }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 750; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi.red .value { color: var(--red); }
.kpi.amber .value { color: var(--amber); }
.kpi.green .value { color: var(--green); }
.kpi .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; margin-bottom: 16px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 10px; }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--amber-50); color: #7a5200; margin-bottom: 16px; font-size: 13px; }

/* ---------- lists & tables ---------- */
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); cursor: pointer; }
.tlist li:first-child { border-top: 0; }
.tlist li:hover { background: #fbfaff; }
.tlist .t-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlist .t-meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbfe; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: center; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fbfaff; }
.tbl .zero { color: #c9c6d4; }
.tbl .redtxt { color: var(--red); font-weight: 700; }
.person { display: flex; align-items: center; gap: 9px; }
.person div b { display: block; font-weight: 600; }
.person div span { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- board ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--brand); color: #fff; }
.toolbar select.input, .toolbar input.input { width: auto; padding: 6px 10px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: #efedf6; border-radius: 12px; padding: 8px; min-height: 200px; transition: background .12s, outline-color .12s; outline: 2px dashed transparent; outline-offset: -2px; }
.col.drop-ok { background: var(--brand-50); outline-color: var(--brand); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 6px 6px 10px; font-weight: 700; font-size: 13px; }
.col-h .n { background: #fff; border-radius: 10px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.col-h .bar { width: 10px; height: 10px; border-radius: 3px; }
.col-cards { display: flex; flex-direction: column; gap: 8px; }
.tcard { background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 11px 12px; cursor: pointer; box-shadow: 0 1px 2px rgba(29,27,38,.04); position: relative; transition: box-shadow .12s, transform .12s; }
.tcard:hover { box-shadow: var(--shadow); }
.tcard[draggable="true"] { cursor: grab; }
.tcard.dragging { opacity: .45; transform: rotate(1deg); }
.tcard.flagged { border-color: #f2b8bf; box-shadow: inset 3px 0 0 var(--red); }
.tcard .flag { position: absolute; top: -8px; right: 10px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.tcard h4 { font-size: 13.5px; font-weight: 650; line-height: 1.35; margin: 6px 0 4px; }
.tcard .client { font-size: 11.5px; color: var(--muted); }
.tcard .by { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.timers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.timer { background: var(--line-2); border-radius: 7px; padding: 5px 8px; }
.timer .tl { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; }
.timer .tv { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.due { background: var(--blue-50); }
.timer.due .tv { color: var(--blue); }
.timer.soon { background: var(--amber-50); }
.timer.soon .tv { color: var(--amber); }
.timer.over { background: var(--red-50); }
.timer.over .tv, .timer.over .tl { color: var(--red); }
.timer.ok { background: var(--green-50); }
.timer.ok .tv { color: var(--green); }
.tcard .foot { display: flex; gap: 8px; align-items: center; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.tcard .rb { margin-top: 8px; font-size: 12px; background: var(--red-50); color: #a02634; padding: 6px 8px; border-radius: 7px; line-height: 1.4; }

/* ---------- drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(24, 20, 40, .38); z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: #fff; z-index: 51; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease-out; }
.drawer-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 19px; line-height: 1.3; margin: 8px 0 0; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 61; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal-h { padding: 18px 22px 0; display: flex; align-items: center; gap: 10px; }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 16px 22px; }
.modal-f { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.scrim.top { z-index: 60; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; background: #fcfbfe; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.meta-grid .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; }
.meta-grid .v { font-weight: 600; margin-top: 3px; font-size: 13px; }
.big-timers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.big-timers .timer { padding: 10px 12px; border-radius: 10px; }
.big-timers .tv { font-size: 20px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.block { margin-bottom: 20px; }
.block > h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.brief { white-space: pre-wrap; line-height: 1.6; color: var(--ink-2); }
.rb-box { border: 1px solid #f2b8bf; background: var(--red-50); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.rb-box b { color: var(--red); }
.delay-box { border: 1px solid #f2d9a6; background: var(--amber-50); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
.files { display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.file .ico { width: 30px; height: 30px; border-radius: 7px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-size: 10px; font-weight: 800; text-transform: uppercase; flex: none; }
.dropzone { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; margin-top: 8px; }
.dropzone.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.timeline { display: flex; flex-direction: column; gap: 2px; }
.ev { display: flex; gap: 10px; padding: 8px 0; }
.ev .body { flex: 1; min-width: 0; }
.ev .who { font-size: 13px; }
.ev .when { font-size: 11.5px; color: var(--muted); }
.ev.note .bubble { background: var(--line-2); border-radius: 10px; padding: 9px 12px; margin-top: 4px; white-space: pre-wrap; line-height: 1.5; }
.ev.sys { font-size: 12.5px; color: var(--ink-2); padding: 4px 0 4px 6px; }
.ev.sys .dotline { width: 22px; display: grid; place-items: center; flex: none; }
.ev.sys .dotline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9c3dc; }
.composer { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.composer textarea { min-height: 44px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-weight: 550; }
.chip:hover, .chip.on { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); }

/* ---------- notifications ---------- */
.popover { position: absolute; right: 28px; top: 58px; width: 380px; max-height: 480px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 40; }
.popover .n { padding: 10px 14px; border-top: 1px solid var(--line-2); cursor: pointer; font-size: 13px; line-height: 1.4; }
.popover .n:hover { background: #fbfaff; }
.popover .n.unread { background: var(--brand-50); }
.popover .n .when { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-lg); animation: pop .16s; }
.toast.err { background: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; }
  .sidebar .brand { padding: 4px 8px; }
  .sidebar .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .sidebar .spacer, .me-card .grow { display: none; }
  .me-card { border: 0; padding: 4px; }
  .topbar, .content { padding-left: 14px; padding-right: 14px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .popover { right: 8px; left: 8px; width: auto; }
}

/* ---------- work clock ---------- */
.clock { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px 6px 5px 12px; box-shadow: var(--shadow); }
.clock .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-50); animation: pulse 2s infinite; }
.clock.idle .dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-50); }
.clock.idle.late .dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.clock.off .dot { background: #b9b4c9; box-shadow: none; animation: none; }
.clock .lbl { font-size: 11px; color: var(--muted); font-weight: 650; line-height: 1.1; }
.clock .val { font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.2; }
.clock.idle .val.idlev { color: var(--amber); }
.clock.idle.late .val.idlev { color: var(--red); }
.btn.start { background: var(--green); border-color: var(--green); color: #fff; padding: 9px 16px; font-size: 14px; box-shadow: 0 0 0 0 rgba(21,132,110,.5); animation: ring 2.2s infinite; }
.btn.start:hover { background: #10705d; }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(21,132,110,.45); } 70% { box-shadow: 0 0 0 10px rgba(21,132,110,0); } 100% { box-shadow: 0 0 0 0 rgba(21,132,110,0); } }
.startday { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--radius); background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; margin-bottom: 18px; box-shadow: var(--shadow); }
.startday h3 { font-size: 17px; }
.startday p { margin: 4px 0 0; opacity: .85; font-size: 13px; }
.startday .btn.start { animation: none; background: #fff; color: var(--brand-deep); border-color: #fff; }
.idle-warn { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--amber-50); color: #7a5200; margin-bottom: 16px; border: 1px solid #f2d9a6; font-size: 13.5px; }
.idle-warn.late { background: var(--red-50); color: #a02634; border-color: #f2b8bf; }

/* ---------- donut ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; padding: 16px; }
.donut { flex: none; }
.donut path { cursor: default; transition: opacity .12s; }
.donut:hover path { opacity: .55; }
.donut path:hover { opacity: 1; }
.donut .big { font-size: 22px; font-weight: 800; fill: var(--ink); }
.donut .sm { font-size: 10.5px; fill: var(--muted); font-weight: 600; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; flex: 1; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend .total { border-top: 1px solid var(--line-2); padding-top: 7px; font-weight: 650; color: var(--ink); }
.dtip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 7px; box-shadow: var(--shadow-lg); }
.myday { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.myday .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; }
.myday .v { font-size: 20px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; }
.myday .v.green { color: var(--green); }
.myday .v.amber { color: var(--amber); }
.util { grid-column: 1 / -1; }
.util .track { height: 8px; border-radius: 6px; background: var(--amber-50); overflow: hidden; display: flex; gap: 2px; }
.util .track span { display: block; height: 100%; border-radius: 6px; }
.state.not_started { color: var(--amber); }
.state.on_break { color: var(--blue); }
.gap-row { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 13px; }
.gap-row:first-child { border-top: 0; }
.gap-row .dur { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gap-row .dur.late { color: var(--red); }
@media (max-width: 900px) { .clock .lbl { display: none; } }

.redtxt { color: var(--red) !important; font-weight: 700; }

.tbl .person div b, .tbl .person div span { white-space: nowrap; }

/* ---------- people & access ---------- */
.pill.acc-super { background: var(--brand-deep); color: #fff; }
.pill.acc-admin { background: var(--brand-50); color: var(--brand-600); }
.pill.acc-add { background: var(--green-50); color: var(--green); }
.pill.acc-emp { background: var(--line-2); color: var(--ink-2); }
.access-tbl td:first-child { font-weight: 550; color: var(--ink-2); }
.access-tbl .yes { color: var(--green); font-weight: 800; font-size: 15px; }
.access-tbl .no { color: #c9c6d4; }
.access-tbl .part { font-size: 12px; font-weight: 650; color: var(--ink-2); background: var(--line-2); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.role-opts { display: grid; gap: 8px; }
.role-opt, .check-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.role-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.role-opt span, .check-row span { display: flex; flex-direction: column; gap: 2px; }
.role-opt small, .check-row small { color: var(--muted); font-size: 12px; }
.role-opt input, .check-row input { margin-top: 3px; accent-color: var(--brand); }
.check-row { margin-bottom: 14px; background: #fbfffd; }
.check-row:has(input:checked) { border-color: var(--green); background: var(--green-50); }
