/* DigiKaragir Staff Timecards — core styles */
:root {
  --blue: #0056D2; --blue-700: #0047AE; --blue-900: #0A2E6B; --blue-50: #EAF1FD; --blue-100: #D2E1FA;
  --orange: #FF6B35; --orange-ink: #B43F0F; --orange-50: #FFF0E9;
  --ink: #13233F; --ink-2: #3A4A63; --muted: #5F6F87; --line: #DAE2EC; --line-2: #EDF1F6;
  --bg: #F0F4F8; --surface: #FFFFFF;
  --ok: #0B7A48; --ok-50: #E5F4EC; --err: #BE2A2F; --err-50: #FCEBEC; --warn: #9A4A06; --warn-50: #FFF3E6;
  --violet: #5B3CC4; --violet-50: #F0ECFD; --grey-50: #EEF1F5;
  --r-lg: 16px; --r-md: 10px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(19, 35, 63, .05), 0 6px 20px -8px rgba(19, 35, 63, .10);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --sidebar-w: 252px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 700; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.ot { color: var(--orange-ink); font-weight: 700; }
.neg, .text-err { color: var(--err); }
.pos, .text-ok { color: var(--ok); }
.pre { white-space: pre-wrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- wordmark ---------- */
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--blue-900); }
.wordmark span { color: var(--blue); }
.wordmark-sm { font-size: 18px; margin-bottom: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:disabled { opacity: .65; cursor: progress; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-700); }
.btn-secondary { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.btn-secondary:hover:not(:disabled) { background: var(--blue-100); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--muted); }
.btn-approve { background: var(--ok); color: #fff; }
.btn-approve:hover:not(:disabled) { background: #09623A; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger-ghost { background: var(--surface); color: var(--err); border-color: #F0C7C9; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--err-50); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--grey-50); }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px; }
.linkbtn:hover { text-decoration: underline; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: sp .7s linear infinite; }
.spin-lg { width: 24px; height: 24px; border-width: 3px; color: var(--blue); }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.opt { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid var(--blue-50); }
input[readonly] { background: var(--grey-50); color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.form-error { background: var(--err-50); color: var(--err); border-radius: var(--r-sm); padding: 10px 12px; font-weight: 600; font-size: 14px; margin: 4px 0 14px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; margin-bottom: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.sub-h { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 8px 0 12px; }
.stack-sm { display: grid; gap: 10px; }

/* ---------- notices / badges / tags ---------- */
.notice { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 14.5px; border: 1px solid; }
.notice-warn { background: var(--warn-50); border-color: #F6D2AE; color: #6D3505; }
.notice-err { background: var(--err-50); border-color: #F0C7C9; color: #8A1C20; }
.notice-ok { background: var(--ok-50); border-color: #BFE3CF; color: #075232; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.badge-draft { background: var(--grey-50); color: var(--ink-2); border-color: var(--line); }
.badge-submitted { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge-approved { background: var(--ok-50); color: var(--ok); border-color: #BFE3CF; }
.badge-rejected { background: var(--err-50); color: var(--err); border-color: #F0C7C9; }
.badge-correction_requested { background: var(--violet-50); color: var(--violet); border-color: #D8CFF7; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--grey-50); color: var(--muted); vertical-align: 1px; }
.tag-ok { background: var(--ok-50); color: var(--ok); }
.tag-warn { background: var(--warn-50); color: var(--warn); }
.tag-blue { background: var(--blue-50); color: var(--blue-700); }

/* ---------- the hours meter (signature element) ---------- */
.meter { padding: 26px 0 6px; }
.meter-track { position: relative; height: 14px; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--line-2) 0 calc(100% / 24 - 2px), #fff calc(100% / 24 - 2px) calc(100% / 24)); box-shadow: inset 0 0 0 1px var(--line); }
.meter-reg, .meter-ot { position: absolute; top: 0; bottom: 0; }
.meter-reg { left: 0; background: var(--blue); border-radius: 999px 0 0 999px; transition: width .25s ease; }
.meter-ot { background: var(--orange); border-radius: 0 999px 999px 0; transition: width .25s ease, left .25s ease; }
.meter-mark { position: absolute; top: -8px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.meter-mark i { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.meter-mark-ot { background: var(--orange-ink); }
.meter-mark-ot i { color: var(--orange-ink); bottom: auto; top: calc(100% + 2px); }
.meter-sm { padding-top: 20px; }
.meter-sm .meter-track { height: 10px; }
@media (prefers-reduced-motion: reduce) { .meter-reg, .meter-ot { transition: none; } }
.status-line { margin: 14px 0 0; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.status-line::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.status-below { color: var(--err); } .status-below::before { background: var(--err); }
.status-met { color: var(--ok); } .status-met::before { background: var(--ok); }
.status-overtime { color: var(--orange-ink); } .status-overtime::before { background: var(--orange); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand { background: var(--blue-900); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.auth-brand .wordmark { color: #fff; font-size: 30px; }
.auth-brand .wordmark span { color: #8FB6F5; }
.auth-tag { margin: -12px 0 12px; color: #B7CCEE; font-weight: 600; }
.auth-sample { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-lg); padding: 18px 20px; max-width: 420px; }
.auth-sample .meter-track { background: rgba(255, 255, 255, .12); box-shadow: none; }
.auth-sample .meter-mark { background: #fff; }
.auth-sample .meter-mark i { color: #D6E3F8; }
.auth-sample .meter-mark-ot, .auth-sample .meter-mark-ot i { color: #FFB694; }
.auth-sample-row { display: flex; justify-content: space-between; font-size: 14px; }
.auth-sample-row.muted { color: #B7CCEE; margin-top: 8px; }
.auth-foot { color: #D6E3F8; max-width: 380px; font-size: 17px; font-weight: 500; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-title { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 18px; }
.auth-note { color: var(--ink-2); margin: 0 0 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--grey-50); border-radius: var(--r-sm); padding: 4px; margin-bottom: 20px; }
.seg-btn { min-height: 40px; border: 0; background: transparent; border-radius: 6px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(19, 35, 63, .12); }
#auth-form .linkbtn { display: block; margin: 12px auto 0; }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; z-index: 40; }
.side-brand { padding: 4px 10px 20px; }
.side-brand p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav-link:hover { background: var(--grey-50); }
.nav-link.on { background: var(--blue-50); color: var(--blue-700); box-shadow: inset 3px 0 0 var(--blue); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-weight: 800; }
.btn .count { margin-left: 2px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); margin-top: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.side-user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-user-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-txt span { font-size: 12.5px; color: var(--muted); }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-titles { flex: 1; min-width: 0; }
#page-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
#page-sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.menu-btn { display: none; }
.view { padding: 24px 32px 48px; max-width: 1320px; width: 100%; outline: none; }
.scrim, .bottomnav { display: none; }

/* ---------- panels / layout ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.panel h2 { margin-bottom: 12px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-h h2 { margin: 0; }
.panel.narrow { max-width: 760px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.dash-grid > .panel { margin: 0; }
.dash-grid .today { grid-row: span 2; }
.dash-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid-2 .panel:first-child { grid-row: auto; }
.dash-grid-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.today-nums { display: flex; gap: 28px; flex-wrap: wrap; }
.today-nums small, .money-row small, .stat small, .summary-strip small, .bd-row small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.today-nums b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.today .btn { margin-top: 18px; }
.goal span { font-weight: 700; display: block; margin-bottom: 4px; }
.goal b { font-size: 24px; font-weight: 800; display: block; }
.goal b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.goal .bar { height: 8px; border-radius: 999px; background: var(--line-2); margin: 10px 0 6px; overflow: hidden; }
.goal .bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.goal > small { font-weight: 600; font-size: 13px; }
.money-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; }
.money-row b { font-size: 24px; font-weight: 800; display: block; }
.money-row span { font-size: 12.5px; }
.money-panel { grid-column: span 2; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 16px; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 14px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv-tight { gap: 6px 16px; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stats-sm { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 2px 0; }
.stats-sm .stat { box-shadow: none; background: transparent; padding: 12px 16px; }
.stats-sm .stat b { font-size: 20px; }
.stat > span { font-size: 13px; color: var(--muted); }
.stat-alert { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange), var(--shadow); }
.bd-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.bd-row b { font-size: 18px; font-weight: 800; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 20px; }
.summary-strip:empty { display: none; }
.summary-strip b { font-size: 20px; font-weight: 800; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; align-items: end; padding-bottom: 4px; }
.filters-cta { margin-bottom: 16px; justify-self: end; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rtable th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.rtable th[data-sort] { cursor: pointer; }
.rtable th[data-sort]:hover { color: var(--ink); }
.rtable th.num { text-align: right; }
.rtable td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rtable tbody tr.clickable { cursor: pointer; }
.rtable tbody tr.clickable:hover { background: #F7FAFD; }
.rtable tfoot th, .rtable tfoot td { padding: 12px; border-top: 2px solid var(--line); font-weight: 700; color: var(--ink); font-size: 14.5px; }
.cell-main { font-weight: 700; }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.cell-task { max-width: 320px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cell-actions { width: 1%; }
.cell-actions .row-actions { min-width: 290px; }
@media (max-width: 760px) { .cell-actions .row-actions { min-width: 0; } }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 36px 16px; }
.empty-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; margin: 0 auto 12px; }
.empty-title { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.empty-text { color: var(--muted); margin: 0 0 16px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px; color: var(--muted); font-weight: 600; }
.error-box { background: var(--err-50); border: 1px solid #F0C7C9; color: #8A1C20; padding: 16px 20px; border-radius: var(--r-md); }
.error-box p { margin: 0 0 8px; font-weight: 600; }

/* ---------- timecard form ---------- */
.tc-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.tc-form > .panel { margin: 0; }
.calc { position: sticky; top: 92px; }
.calc-h { font-size: 15px; }
.calc-list { margin: 16px 0 12px; display: grid; gap: 6px; }
.calc-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.calc-list dt { color: var(--muted); font-weight: 600; }
.calc-list dd { margin: 0; font-weight: 700; }
.calc-list .sep { height: 1px; background: var(--line); margin: 6px 0; }
.calc-list .total { border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 6px; }
.calc-list .total dt { color: var(--ink); font-weight: 800; }
.calc-list .total dd { font-size: 22px; font-weight: 800; color: var(--blue-900); }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.stepper { display: flex; align-items: stretch; gap: 8px; }
.stepper input { max-width: 140px; text-align: center; font-size: 22px; font-weight: 800; }
.step { width: 52px; min-height: 52px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; font-size: 24px; font-weight: 600; cursor: pointer; color: var(--blue); }
.step:hover { border-color: var(--blue); background: var(--blue-50); }
.stepper-hm { align-self: center; color: var(--muted); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- detail ---------- */
.detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.detail-hours { margin-bottom: 12px; }
.big-h { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.big-h span { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 10px; }
.calc-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14.5px; }
.calc-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 0; width: 90px; }
.calc-table td { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.calc-table .total th, .calc-table .total td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 800; color: var(--ink); font-size: 16px; }

/* ---------- feed / timeline ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed > li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.feed > li:last-child { border-bottom: 0; }
.feed p { margin: 0; font-size: 14px; }
.feed time { font-size: 12.5px; color: var(--muted); }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 6px; flex: none; }
.act-approved { background: var(--ok); } .act-rejected { background: var(--err); } .act-correction_requested { background: var(--violet); }
.act-submitted, .act-resubmitted { background: var(--blue); } .act-admin_edited, .act-staff_updated, .act-settings_updated { background: var(--orange); }
.feed-reason { color: var(--ink-2); font-style: italic; }
.changes { margin: 6px 0 2px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.changes s { color: var(--muted); }
details summary { cursor: pointer; font-size: 13px; color: var(--blue); font-weight: 600; margin: 4px 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.timeline time { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.timeline p { margin: 2px 0 0; font-size: 14px; }

/* ---------- dialog ---------- */
.dlg { border: 0; padding: 0; border-radius: var(--r-lg); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px -12px rgba(19, 35, 63, .35); color: var(--ink); }
.dlg.dlg-wide { width: min(760px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(19, 35, 63, .45); }
.dlg-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 12px 22px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 18px; }
.dlg-body { padding: 18px 22px 6px; overflow-y: auto; }
.dlg-msg { margin: 0 0 16px; color: var(--ink-2); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; background: #FAFBFD; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 1000; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); border-left: 4px solid var(--ok); animation: tin .2s ease; }
.toast-err { border-left-color: #FF8A8E; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast, .spin { animation-duration: 0s; } }

/* hide the redundant header CTA on the form it links to */
body[data-route="add"] .topbar-actions, body[data-route="pending"] .topbar-actions { display: none; }
