/* Copyright 2026 CLEALINK TECHNOLOGY CO.,LTD. All rights reserved. */

/* Signed-in pages: the shell (navigation, top bar, account), and the parts every page shares: page head, cards,
   tags, tables, form rows, states. Compact for mouse users; larger targets when the density is "large". */

.app-page { --ctl-h: 36px; --row-h: 38px; --nav-w: 220px; }
:root[data-density="large"] .app-page { --ctl-h: 44px; --row-h: 48px; }

.skip { position: absolute; left: 8px; top: -48px; z-index: 600; background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-13); }
.skip:focus { top: 8px; }

.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.app-nav {
  position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; z-index: 20;
}
.app[data-area="admin"] .app-nav, .app[data-area="system"] .app-nav { gap: 2px; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-15); padding: 4px 12px 16px; color: var(--text); text-decoration: none; min-width: 0; }
.nav-brand .brand-mark { width: 22px; height: 22px; }
.nav-brand img { height: 24px; max-width: 120px; object-fit: contain; flex: none; }
.nav-brand span.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app[data-area="admin"] .nav-brand, .app[data-area="system"] .nav-brand { padding-bottom: 8px; }
/* The mark of the system administration: beside the name where there is room, below it in the side bar. */
.nav-brand .brand-tag { flex: none; }
.app[data-area="system"] .app-nav .nav-brand { flex-wrap: wrap; row-gap: 4px; }
.app[data-area="system"] .app-nav .nav-brand .brand-name { flex: 1 0 calc(100% - 30px); }
.app-nav .nav-brand .brand-tag { margin-left: 30px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r-md); color: var(--text-2);
  font-size: var(--fs-13); text-decoration: none; flex: none; min-width: 0; white-space: nowrap; border: 0; background: none; width: 100%; text-align: left;
}
.nav-link span { overflow: hidden; text-overflow: ellipsis; }
.nav-link svg.icon { width: 18px; height: 18px; }
.app[data-area="admin"] .nav-link, .app[data-area="system"] .nav-link { height: 36px; }
:root[data-hover="1"] .nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--on-bg); color: var(--on-text); font-weight: 600; }
.nav-link:focus-visible { outline-offset: -2px; }
.nav-group { font-size: var(--fs-11); color: var(--muted); padding: 14px 12px 4px; }
.nav-spacer { flex: 1; min-height: 12px; }
.nav-note { font-size: var(--fs-11); color: var(--muted); padding: 12px; line-height: 1.6; border-top: 1px solid var(--line); margin-top: 8px; }
.nav-account {
  appearance: none; border: 0; border-top: 1px solid var(--line); background: none; margin-top: 8px; padding: 12px; display: flex; gap: 10px; align-items: center;
  text-align: left; width: 100%; color: var(--text); border-radius: 0 0 var(--r-md) var(--r-md); min-width: 0; flex: none;
}
:root[data-hover="1"] .nav-account:hover { background: var(--surface-2); }
.nav-account .who { font-size: var(--fs-12); min-width: 0; flex: 1; }
.nav-account .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account .who span { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account svg.icon { width: 16px; height: 16px; color: var(--muted); }
.face { width: 32px; height: 32px; border-radius: 50%; background: #3A4656; color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--fs-13); font-weight: 600; flex: none; user-select: none; }
.face-lg { width: 40px; height: 40px; font-size: var(--fs-15); background: var(--primary); color: var(--on-primary); }
:root[data-density="large"] .nav-link { height: 48px; font-size: var(--fs-14); }

.app-top { display: none; }
.nav-scrim { display: none; }
.app-main { min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; outline: none; }
.app[data-area="admin"] .app-main, .app[data-area="system"] .app-main { padding: 24px 28px; gap: 16px; }

/* Narrow windows, and touch layouts below desktop width: the navigation becomes a drawer under a top bar. */
@media (max-width: 959px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .app-top {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 52px; padding: 0 8px 0 4px;
    background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .app-top .nav-brand { padding: 0 4px; flex: 1; }
  .app-top .icon-btn { width: 44px; height: 44px; color: var(--text); }
  .app-nav {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); visibility: hidden;
    transition: transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); box-shadow: var(--shadow-2); z-index: 60; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .app[data-nav="open"] .app-nav { transform: none; visibility: visible; transition: transform var(--t-med) var(--ease); }
  .app[data-nav="open"] .nav-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
  .app-main, .app[data-area="admin"] .app-main, .app[data-area="system"] .app-main { padding: 16px; gap: 16px; }
  .nav-link, .app[data-area="admin"] .nav-link { height: 44px; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  :root[data-density="large"] .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  :root[data-density="large"] .app-top { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px 0 4px; background: var(--surface); border-bottom: 1px solid var(--border); }
  :root[data-density="large"] .app-top .nav-brand { padding: 0 4px; flex: 1; }
  :root[data-density="large"] .app-top .icon-btn { color: var(--text); }
  :root[data-density="large"] .app-nav { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; height: auto; transform: translateX(-102%); visibility: hidden; transition: transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); box-shadow: var(--shadow-2); z-index: 60; }
  :root[data-density="large"] .app[data-nav="open"] .app-nav { transform: none; visibility: visible; transition: transform var(--t-med) var(--ease); }
  :root[data-density="large"] .app[data-nav="open"] .nav-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
  :root[data-density="large"] .app-main { padding: 20px; }
}

/* ---------- page head ---------- */

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head.center { align-items: center; gap: 12px; }
.page-head .titles { flex: 1; min-width: 200px; }
.page-head h1 { font-size: 22px; font-weight: 700; line-height: 1.3; outline: none; }
.app[data-area="admin"] .page-head h1, .app[data-area="system"] .page-head h1, .page-head.center h1 { font-size: var(--fs-20); }
.page-head .sub { font-size: var(--fs-13); color: var(--muted); margin-top: 4px; }
.page-head.baseline { align-items: baseline; gap: 12px; }
.page-head.baseline .titles { flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.page-head.center .titles { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.page-head.baseline .sub { margin: 0; font-size: var(--fs-12); flex: 1; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: inherit; text-decoration: none; }
:root[data-hover="1"] .crumbs a:hover { color: var(--text); text-decoration: underline; }
.zone-note { font-size: var(--fs-11); color: var(--muted); white-space: nowrap; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- controls at the density of these pages ---------- */

.app-page .btn { height: var(--ctl-h); padding: 0 14px; text-decoration: none; }
.app-page .btn-sm { height: calc(var(--ctl-h) - 4px); padding: 0 12px; font-size: var(--fs-12); }
.app-page .btn-xs { height: calc(var(--ctl-h) - 6px); padding: 0 10px; font-size: var(--fs-12); }
.app-page .btn-lg { height: calc(var(--ctl-h) + 4px); padding: 0 16px; }
.btn-danger-quiet { color: var(--red-text); border-color: var(--danger-line); }
.btn-danger-quiet:hover:not(:disabled) { background: var(--red-bg); border-color: var(--red); }
.btn-link { appearance: none; border: 0; background: none; padding: 0; color: var(--link); font-size: inherit; text-decoration: none; cursor: pointer; }
:root[data-hover="1"] .btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red-text); }
.app-page .input, .app-page .select { height: var(--ctl-h); border-radius: var(--r-md); padding: 0 10px; font-size: var(--fs-13); }
.app-page textarea.input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.app-page .input-num { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.app-page .input-mono { font-family: var(--font-mono); }
.app-page .input:disabled, .app-page .select:disabled { background: var(--fill); color: var(--faint); cursor: not-allowed; }
.app-page .seg button { height: calc(var(--ctl-h) - 6px); }
.seg button:disabled, .seg button[aria-disabled="true"] { background: var(--fill); color: var(--faint); cursor: not-allowed; }
.seg button[aria-checked="true"][aria-disabled="true"] { background: var(--fill); color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); min-height: 24px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex: none; }
.check.small { font-size: var(--fs-12); color: var(--muted); }
:root[data-density="large"] .check { min-height: 44px; }
:root[data-density="large"] .check input { width: 20px; height: 20px; }
.field .hint, .hint { font-size: var(--fs-11); color: var(--muted); line-height: 1.6; }
.field .err, .err { font-size: var(--fs-12); color: var(--red-text); line-height: 1.5; }
.field-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

/* ---------- cards, tags, numbers ---------- */

.pane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); min-width: 0; }
.pane.pad { padding: 16px 20px; }
.pane.col { display: flex; flex-direction: column; }
.pane.accent { border: 2px solid var(--primary); }
.pane.accent.pad { padding: 15px 19px; }
.pane-head { padding: 14px 18px; font-size: var(--fs-14); font-weight: 700; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pane-head.flat { border-bottom: 0; padding: 12px 16px; }
.pane-head h2 { margin: 0; font-size: inherit; }
.pane-head .side { font-size: var(--fs-12); color: var(--muted); font-weight: 400; }
.pane h2, .pane-title { font-size: var(--fs-14); font-weight: 700; margin: 0 0 10px; }
.pane h2 small, .pane-title small { font-weight: 400; font-size: var(--fs-11); color: var(--muted); margin-left: 8px; }
.pane-foot { margin-top: auto; padding: 10px 14px; font-size: var(--fs-12); color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; line-height: 1.7; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.split.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.tight { gap: 14px; }
.grow { flex: 1; }

.tag { border-radius: var(--r-sm); padding: 2px 8px; font-size: var(--fs-11); font-weight: 600; white-space: nowrap; background: var(--tag-bg); color: var(--tag-text); display: inline-block; line-height: 1.5; }
.tag-green { background: var(--green-bg); color: var(--green-text); }
.tag-amber { background: var(--amber-bg); color: var(--amber-text); }
.tag-red { background: var(--red-bg); color: var(--red-text); }
.tag-blue { background: var(--on-bg); color: var(--on-text); }
.tag-quiet { background: var(--fill); color: var(--muted); }
.mini-tag { border-radius: 5px; padding: 1px 6px; font-size: var(--fs-10); font-weight: 600; background: var(--fill); color: var(--text-2); margin-right: 3px; display: inline-block; }
.text-amber { color: var(--amber-text); font-weight: 600; }
.text-red { color: var(--red-text); font-weight: 600; }
.text-green { color: var(--green-text); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: var(--fs-12); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.kpi { padding: 14px 18px; min-width: 0; }
.kpi b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.kpi b small { font-size: var(--fs-14); font-weight: 700; }
.kpi span { font-size: var(--fs-12); color: var(--muted); }
.kpis.six .kpi { padding: 12px 16px; font-size: var(--fs-11); color: var(--muted); }
.kpis.six .kpi b { font-size: var(--fs-20); color: var(--text); }
.kpi b.good { color: var(--green-text); }
.kpi b.warn { color: var(--amber-text); }

.rows-list .r, .r { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-13); min-height: 44px; }
.r:last-child, .r.last { border-bottom: 0; }
.r { flex-wrap: wrap; }
.r > .lbl { min-width: 0; flex: 1 1 180px; }
.r small { display: block; font-size: var(--fs-11); color: var(--muted); line-height: 1.5; }
.r .ctl-side { display: flex; align-items: center; gap: 8px; flex: none; }
.r .lim { font-size: var(--fs-11); color: var(--muted); width: 92px; text-align: right; white-space: nowrap; }
.r b.val { font-weight: 600; text-align: right; }
.r.slim { min-height: 0; padding: 8px 0; }
.note-box { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-12); color: var(--muted); line-height: 1.7; }
.note-box code, code.inline { background: var(--surface-2); border-radius: 5px; padding: 2px 6px; font: var(--fs-12) var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.note-box code { background: none; padding: 0; }
.msg { border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-12); font-weight: 600; line-height: 1.6; }
.msg-ok { background: var(--green-bg); color: var(--green-text); }
.msg-warn { background: var(--amber-bg); color: var(--amber-text); }
.msg-bad { background: var(--red-bg); color: var(--red-text); }
.msg-info { background: var(--surface-2); color: var(--muted); font-weight: 400; }
.msg small { display: block; font-weight: 400; }
.linkbox { flex: 1; background: var(--surface-2); border-radius: var(--r-md); padding: 8px 10px; font-size: var(--fs-12); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.linkbox.mono { font-family: var(--font-mono); color: var(--text-2); padding: 9px 12px; }

/* ---------- tables ---------- */

.table-wrap { overflow: auto; min-height: 0; flex: 1; }
.table { border-collapse: collapse; width: 100%; font-size: var(--fs-12); }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; height: var(--row-h); }
.table th { color: var(--muted); font-weight: 500; background: var(--th-bg); position: sticky; top: 0; z-index: 2; }
.table.plain th { background: var(--surface); }
.table td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.table td.num, .table th.num { font-variant-numeric: tabular-nums; }
.table td.right, .table th.right { text-align: right; }
.table td b { font-weight: 600; }
.table tbody tr { outline: none; }
:root[data-hover="1"] .table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.table tbody tr[aria-selected="true"] { background: var(--row-sel); }
.table tbody tr[data-open] { cursor: pointer; }
.table .th-sort { appearance: none; border: 0; background: none; color: inherit; font: inherit; padding: 0; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.table .th-sort svg.icon { width: 14px; height: 14px; opacity: .35; }
.table th[aria-sort="ascending"] .th-sort svg.icon, .table th[aria-sort="descending"] .th-sort svg.icon { opacity: 1; color: var(--text); }
.table td.acts { text-align: right; padding-top: 0; padding-bottom: 0; width: 1%; }
.table td.acts > * { vertical-align: middle; }
.table .row-more { width: 28px; height: 28px; }
:root[data-density="compact"] .table .row-more { opacity: 0; }
:root[data-density="compact"] .table tr:hover .row-more, :root[data-density="compact"] .table tr:focus-within .row-more, .table .row-more:focus-visible, .table .row-more[aria-expanded="true"] { opacity: 1; }
:root[data-density="large"] .table .row-more { width: 44px; height: 44px; }
.table-note { padding: 12px 16px; font-size: var(--fs-12); color: var(--muted); }
.pager { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.pager .icon-btn { width: 28px; height: 28px; border: 1px solid var(--border); }
.pager .icon-btn:disabled { opacity: .4; }
:root[data-density="large"] .pager .icon-btn { width: 44px; height: 44px; }

/* ---------- filters and list panes ---------- */

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters label { font-size: var(--fs-12); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.filters .input, .filters .select { width: auto; height: calc(var(--ctl-h) - 2px); font-size: var(--fs-12); }
.list-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.list-pane { flex: 1; min-height: 240px; display: flex; flex-direction: column; overflow: hidden; }
.pane-foot label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pane-foot .select { width: auto; height: 28px; font-size: var(--fs-12); padding: 0 6px; }
:root[data-density="large"] .pane-foot .select { height: 44px; }

/* ---------- states ---------- */

.state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 36px 20px; color: var(--muted); font-size: var(--fs-13); flex: 1; min-height: 140px; }
.state.small { padding: 18px 16px; min-height: 0; }
.state .state-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.state b { color: var(--text); font-size: var(--fs-14); font-weight: 600; }
.state p { max-width: 420px; line-height: 1.7; }
.state-error .state-icon { background: var(--red-bg); color: var(--red-text); }
.state .btn { margin-top: 6px; }
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.skeleton i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--fill) 25%, var(--line) 37%, var(--fill) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton i:nth-child(2) { width: 82%; } .skeleton i:nth-child(3) { width: 64%; } .skeleton i:nth-child(4) { width: 74%; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.forbidden { margin: auto; max-width: 440px; }

/* ---------- dialogs with forms ---------- */

.form { display: flex; flex-direction: column; gap: 12px; }
.form .field > span, .form .field > label { color: var(--muted); }
.dialog .dialog-body .form { padding-top: 4px; }
.dialog-foot .left { margin-right: auto; }
.dev-box { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.dev-box .dev-tag { font-size: var(--fs-11); font-weight: 700; color: var(--amber-text); letter-spacing: .04em; }
.result-list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-12); max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.result-list li { display: flex; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.result-list li:last-child { border-bottom: 0; }

/* Token input: chosen people or addresses as chips, with suggestions underneath. */
.tokens { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 7px 8px; min-height: 40px; background: var(--surface); align-items: center; position: relative; }
.tokens:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.tokens input { border: 0; outline: 0; background: none; font-size: var(--fs-13); flex: 1; min-width: 180px; height: 24px; padding: 0 4px; color: var(--text); }
.tokens input::placeholder { color: var(--faint); }
.tokens:has(input:disabled) { background: var(--fill); color: var(--muted); }
.token { display: inline-flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 14px; padding: 3px 4px 3px 10px; font-size: var(--fs-12); max-width: 100%; }
.token > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token small { color: var(--muted); font-size: inherit; }
.token small.ext { color: var(--amber-text); }
.token.own { background: var(--on-bg); color: var(--on-text); padding-right: 10px; }
.token button { appearance: none; border: 0; background: none; color: var(--muted); width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.token button svg.icon { width: 12px; height: 12px; }
:root[data-hover="1"] .token button:hover { background: var(--border); color: var(--text); }
:root[data-density="large"] .token { padding: 6px 6px 6px 12px; font-size: var(--fs-13); }
:root[data-density="large"] .token button { width: 28px; height: 28px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--raised); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 4px; list-style: none; margin: 0; max-height: 240px; overflow: auto; }
.suggest li { padding: 7px 10px; border-radius: var(--r-sm); font-size: var(--fs-13); display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.suggest li small { color: var(--muted); font-size: var(--fs-12); }
.suggest li[aria-selected="true"] { background: var(--on-bg); }
.suggest li.none { color: var(--muted); cursor: default; }

/* Weekly hours editor: one lane per weekday, bars for the allowed ranges. */
.week { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 5px 8px; align-items: center; font-size: var(--fs-11); color: var(--muted); }
.week-lane { position: relative; height: 18px; background: var(--fill); border-radius: 4px; touch-action: none; cursor: crosshair; outline: none; }
.week-lane:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.week-lane i { position: absolute; top: 0; bottom: 0; background: var(--bar); border-radius: 4px; display: block; cursor: grab; }
.week-lane i::before, .week-lane i::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.week-lane i::before { left: 0; } .week-lane i::after { right: 0; }
.week-lane i.draft { opacity: .55; }
.week[data-disabled="1"] .week-lane { cursor: default; opacity: .6; }
.week[data-disabled="1"] .week-lane i { cursor: default; }
.week-axis { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
:root[data-density="large"] .week-lane { height: 28px; }
.week-times { display: grid; grid-template-columns: 28px repeat(2, minmax(0, 110px)) auto; gap: 6px 8px; align-items: center; font-size: var(--fs-12); margin-top: 10px; }
.week-times .input { height: 30px; padding: 0 6px; font-size: var(--fs-12); }
:root[data-density="large"] .week-times .input { height: 44px; }

@media (max-width: 1100px) {
  .split, .split.wide-left, .split.even, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4 { grid-column: span 2; }
  .page-head h1 { font-size: var(--fs-20); }
  .r { flex-wrap: wrap; }
}

/* ---------- sign-in page ---------- */

.login-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 24px; gap: 16px; }
.login-card { width: 100%; max-width: 424px; }
.login-card .btn-lg { height: 48px; }
.login-card .or { display: flex; align-items: center; gap: 12px; font-size: var(--fs-11); color: var(--muted); }
.login-card .or::before, .login-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login-card .inline-form { display: flex; gap: 8px; }
.login-card .inline-form .input { height: 40px; font-size: var(--fs-14); }
.login-card .inline-form .btn { height: 40px; }
