@font-face { font-family: "Inter"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f2f5f7; --surface: #ffffff; --surface-2: #f7f9fb; --surface-3: #eef2f5;
  --text: #0e1b24; --muted: #5a6b78; --faint: #8796a2; --border: #e2e8ed; --border-strong: #c9d3db;
  --primary: hsl(var(--bh) var(--bs) var(--bl)); --primary-hover: hsl(var(--bh) var(--bs) calc(var(--bl) - 5%)); --primary-soft: hsl(var(--bh) calc(var(--bs) * .6) 93%); --primary-ink: hsl(var(--bh) var(--bs) calc(var(--bl) - 10%)); --primary-text: #ffffff;
  --good: #137a43; --good-soft: #def5e6; --warn: #a45a07; --warn-soft: #fdf0d3; --bad: #b4232a; --bad-soft: #fde4e4; --info: #1f55c4; --info-soft: #e1ebfd;
  --nav-bg: #ffffff; --nav-text: #4b5d6a; --nav-strong: #0e1b24; --nav-hover: rgba(14,27,36,.05); --nav-active: var(--primary-soft); --nav-accent: var(--primary); --nav-border: #e2e8ed; --nav-label: #8796a2; --nav-btn-bg: #f2f5f7;
  --hero-bg: linear-gradient(120deg, hsl(var(--bh) calc(var(--bs) * .55) 96%) 0%, hsl(var(--bh) calc(var(--bs) * .55) 90%) 100%); --hero-text: var(--primary-ink); --hero-sub: hsl(var(--bh) calc(var(--bs) * .45) 32%); --hero-border: hsl(var(--bh) calc(var(--bs) * .45) 85%); --hero-orb: hsl(var(--bh) var(--bs) var(--bl) / .08);
  color-scheme: light;
  --shadow-sm: 0 1px 2px rgba(14,27,36,.05); --shadow: 0 1px 2px rgba(14,27,36,.04), 0 6px 20px -8px rgba(14,27,36,.12); --shadow-lg: 0 24px 60px -12px rgba(14,27,36,.35);
  --bh: 174; --bs: 84%; --bl: 26%;
  --r: 12px; --r-lg: 16px; --nav-w: 244px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] {
    --bg: #0b1318; --surface: #121d24; --surface-2: #17242d; --surface-3: #1d2d38; --text: #e8eef2; --muted: #9bacb8; --faint: #6f8392; --border: #223340; --border-strong: #324858;
    --primary: hsl(var(--bh) var(--bs) calc(var(--bl) + 30%)); --primary-hover: hsl(var(--bh) var(--bs) calc(var(--bl) + 38%)); --primary-soft: hsl(var(--bh) calc(var(--bs) * .55) 17%); --primary-ink: hsl(var(--bh) var(--bs) 82%); --primary-text: hsl(var(--bh) 60% 9%);
    --good: #5fd78d; --good-soft: #112f1f; --warn: #f0b64e; --warn-soft: #352809; --bad: #ff8a8f; --bad-soft: #3a1618; --info: #8db4ff; --info-soft: #14284d;
    --nav-bg: #0a1419; --nav-text: #aebfca; --nav-strong: #ffffff; --nav-hover: rgba(255,255,255,.06); --nav-active: rgba(255,255,255,.11); --nav-accent: var(--primary); --nav-border: rgba(255,255,255,.09); --nav-label: #6d8392; --nav-btn-bg: rgba(255,255,255,.07);
    --hero-bg: linear-gradient(120deg, hsl(var(--bh) 55% 15%) 0%, hsl(var(--bh) 65% 24%) 55%, hsl(var(--bh) 65% 31%) 100%); --hero-text: #ffffff; --hero-sub: hsl(var(--bh) 40% 82%); --hero-border: transparent; --hero-orb: rgba(255,255,255,.07);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.55); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0b1318; --surface: #121d24; --surface-2: #17242d; --surface-3: #1d2d38; --text: #e8eef2; --muted: #9bacb8; --faint: #6f8392; --border: #223340; --border-strong: #324858;
    --primary: hsl(var(--bh) var(--bs) calc(var(--bl) + 30%)); --primary-hover: hsl(var(--bh) var(--bs) calc(var(--bl) + 38%)); --primary-soft: hsl(var(--bh) calc(var(--bs) * .55) 17%); --primary-ink: hsl(var(--bh) var(--bs) 82%); --primary-text: hsl(var(--bh) 60% 9%);
    --good: #5fd78d; --good-soft: #112f1f; --warn: #f0b64e; --warn-soft: #352809; --bad: #ff8a8f; --bad-soft: #3a1618; --info: #8db4ff; --info-soft: #14284d;
    --nav-bg: #0a1419; --nav-text: #aebfca; --nav-strong: #ffffff; --nav-hover: rgba(255,255,255,.06); --nav-active: rgba(255,255,255,.11); --nav-accent: var(--primary); --nav-border: rgba(255,255,255,.09); --nav-label: #6d8392; --nav-btn-bg: rgba(255,255,255,.07);
    --hero-bg: linear-gradient(120deg, hsl(var(--bh) 55% 15%) 0%, hsl(var(--bh) 65% 24%) 55%, hsl(var(--bh) 65% 31%) 100%); --hero-text: #ffffff; --hero-sub: hsl(var(--bh) 40% 82%); --hero-border: transparent; --hero-orb: rgba(255,255,255,.07);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.55); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .92rem; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.boot { padding: 2rem; color: var(--muted); }
.muted { color: var(--muted); } .small-text { font-size: .84rem; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; } .stack > * + * { margin-top: 1.1rem; } .stack-sm > * + * { margin-top: .55rem; }
.grid { display: grid; gap: 1rem; } .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ shell ============ */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav { background: var(--nav-bg); color: var(--nav-text); padding: 1.1rem .8rem; border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; padding: .2rem .6rem 1.2rem; font-size: 1.05rem; color: var(--nav-strong); letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, hsl(var(--bh) var(--bs) calc(var(--bl) + 16%)), hsl(var(--bh) var(--bs) var(--bl))); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 14px -4px hsl(var(--bh) var(--bs) var(--bl) / .6); }
.nav a.item { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; color: var(--nav-text); font-weight: 500; font-size: .93rem; transition: background .12s, color .12s; }
.nav a.item:hover { background: var(--nav-hover); color: var(--nav-strong); text-decoration: none; }
.nav a.item.active { background: var(--nav-active); color: var(--nav-strong); font-weight: 600; box-shadow: inset 3px 0 0 var(--nav-accent); }
.nav a.item svg { opacity: .85; flex: none; }
.nav .section-label { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--nav-label); padding: 1.1rem .8rem .35rem; font-weight: 600; }
.nav .badge { margin-left: auto; background: var(--primary); color: var(--primary-text); border-radius: 99px; font-size: .72rem; padding: .02rem .5rem; min-width: 1.45rem; text-align: center; font-weight: 700; }
.nav .spacer { flex: 1; }
.nav .who { border-top: 1px solid var(--nav-border); padding: .9rem .4rem 0; margin-top: .5rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--bh) var(--bs) calc(var(--bl) + 24%)), hsl(var(--bh) var(--bs) var(--bl))); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.nav .who strong { color: var(--nav-strong); font-size: .9rem; } .nav .who .btn { background: var(--nav-btn-bg); border-color: transparent; color: var(--nav-text); box-shadow: none; } .nav .who .btn:hover:not(:disabled) { background: var(--nav-hover); color: var(--nav-strong); }
.nav-seg { display: flex; gap: 2px; background: var(--nav-btn-bg); border-radius: 10px; padding: 3px; margin-top: .65rem; } .nav-seg button { flex: 1; border: 0; background: transparent; color: var(--nav-text); font-size: .75rem; font-weight: 600; padding: .32rem .2rem; border-radius: 8px; cursor: pointer; } .nav-seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.main { padding: 2rem clamp(1rem, 3.2vw, 2.75rem) 4rem; max-width: 1320px; width: 100%; min-width: 0; }
.topbar { display: none; }
.tabbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; } .page-head .sub { color: var(--muted); margin-top: .3rem; max-width: 62ch; }
.crumb { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .35rem; font-weight: 500; } .crumb:hover { color: var(--primary); text-decoration: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; z-index: 60; transform: translateX(-102%); transition: transform .22s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
  .nav.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(6,14,19,.5); z-index: 59; backdrop-filter: blur(2px); }
  .topbar { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; font-weight: 700; }
  .topbar .logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, hsl(var(--bh) var(--bs) calc(var(--bl) + 16%)), hsl(var(--bh) var(--bs) var(--bl))); color: #fff; display: grid; place-items: center; font-size: .85rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem .2rem; font-size: .7rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 10px; position: relative; cursor: pointer; }
  .tabbar a.active { color: var(--primary); } .tabbar a:hover { text-decoration: none; }
  .tabbar .dot { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--primary); color: var(--primary-text); border-radius: 99px; font-size: .65rem; min-width: 16px; text-align: center; padding: 0 4px; }
  .main { padding-bottom: 6rem; padding-top: 1.25rem; }
  h1 { font-size: 1.45rem; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; } }

/* ============ surfaces ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 1.25rem 1.35rem; }
.card.flat { box-shadow: none; } .card.tight { padding: .8rem 1rem; border-radius: var(--r); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; } .card-head h2, .card-head h3 { margin: 0; }
.stat { display: flex; flex-direction: column; gap: .2rem; position: relative; overflow: hidden; transition: transform .12s, box-shadow .12s, border-color .12s; color: inherit; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.stat .num { font-size: 2rem; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .stat .lbl { color: var(--muted); font-size: .84rem; font-weight: 500; }
.stat .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: .6rem; }
.stat .ico.amber { background: var(--warn-soft); color: var(--warn); } .stat .ico.blue { background: var(--info-soft); color: var(--info); } .stat .ico.green { background: var(--good-soft); color: var(--good); }
.hero { background: var(--hero-bg); color: var(--hero-text); border: 1px solid var(--hero-border); border-radius: 20px; padding: 1.6rem 1.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--hero-orb); pointer-events: none; }
.hero h1 { color: var(--hero-text); margin: 0 0 .15rem; } .hero p { color: var(--hero-sub); margin: 0; } .hero .btn { position: relative; z-index: 1; }
:root[data-theme="dark"] .hero .btn.primary { background: #fff; color: #0a4d48; border-color: #fff; }
.alert { padding: .8rem 1rem; border-radius: var(--r); border: 1px solid; margin-bottom: 1rem; line-height: 1.5; }
.alert.error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 28%, transparent); color: var(--info); }
.alert.ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); color: var(--good); }
.alert ul { margin: .35rem 0 0 1.1rem; padding: 0; }
.empty { text-align: center; padding: 2.6rem 1rem; color: var(--muted); border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface-2); } .empty strong { display: block; color: var(--text); margin-bottom: .25rem; font-size: 1.02rem; }
.spinner { display: flex; align-items: center; gap: .6rem; color: var(--muted); padding: 1.5rem 0; }
.spinner .dot { width: 16px; height: 16px; border: 2.5px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ controls ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1.05rem; min-height: 40px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .93rem; transition: background .12s, border-color .12s, transform .06s, box-shadow .12s; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); }
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--faint); text-decoration: none; } .btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 14px -6px color-mix(in srgb, var(--primary) 70%, transparent); } .btn.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.danger:hover:not(:disabled) { filter: brightness(.93); background: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; } .btn.ghost:hover:not(:disabled) { background: var(--surface-3); border-color: transparent; }
.btn.small { min-height: 32px; padding: .25rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn.big { min-height: 54px; font-size: 1.05rem; width: 100%; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); transition: background .12s, color .12s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); } .icon-btn:disabled { opacity: .3; cursor: default; } .icon-btn.danger:hover { color: var(--bad); background: var(--bad-soft); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field-label { font-weight: 600; font-size: .85rem; color: var(--text); } .hint { color: var(--muted); font-size: .8rem; } .field-error { color: var(--bad); font-size: .85rem; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .8rem; min-height: 42px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; } .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.form-grid { display: grid; gap: 0 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; }
.form-grid.hdr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .form-grid.hdr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .form-grid.hdr-grid { grid-template-columns: 1fr; } }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; }
.seg button { border: 0; background: transparent; padding: .42rem .9rem; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--muted); border-radius: 8px; transition: background .12s, color .12s; } .seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: .7rem 1rem; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; font-size: .93rem; }
.tabs button:hover { color: var(--text); } .tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.chip.green { background: var(--good-soft); color: var(--good); } .chip.amber { background: var(--warn-soft); color: var(--warn); }
.chip.blue { background: var(--info-soft); color: var(--info); } .chip.red { background: var(--bad-soft); color: var(--bad); } .chip.teal { background: var(--primary-soft); color: var(--primary); }

/* ============ tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: .7rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; }
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; } table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s; } table.data tbody tr:hover { background: var(--surface-2); } table.data tr.clickable { cursor: pointer; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tfoot td { font-weight: 700; background: var(--surface-2); }

/* ============ modal / toast ============ */
html:has(.modal-backdrop), body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(6,14,19,.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: hidden; overscroll-behavior: contain; animation: fade .15s; }
.modal { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); min-height: 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(540px, 100%); border: 1px solid var(--border); animation: pop .18s cubic-bezier(.2,.9,.3,1.1); }
.modal.wide { width: min(840px, 100%); }
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem .4rem; } .modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: .5rem 1.3rem 1.3rem; } .modal-foot { flex: none; padding: .9rem 1.3rem; border-top: 1px solid var(--border); display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 20px 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 460px); pointer-events: none; }
@media (min-width: 861px) { .toasts { bottom: 1.5rem; } }
.toast { background: #0e1b24; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; pointer-events: auto; max-width: 100%; animation: pop .2s; }
.toast.error { background: #b4232a; } .toast.ok { background: hsl(var(--bh) var(--bs) var(--bl)); }

/* ============ login ============ */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { background: radial-gradient(1200px 600px at 10% 0%, hsl(var(--bh) 55% 28%) 0%, transparent 60%), linear-gradient(160deg, hsl(var(--bh) 45% 13%), hsl(var(--bh) 55% 20%) 60%, hsl(var(--bh) 60% 26%)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h2 { font-size: 2.1rem; line-height: 1.15; letter-spacing: -.03em; max-width: 14ch; margin: 0 0 1rem; color: #fff; } .login-art p { color: hsl(var(--bh) 35% 80%); max-width: 38ch; font-size: 1.02rem; }
.login-art ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; color: hsl(var(--bh) 35% 88%); } .login-art li { display: flex; gap: .7rem; align-items: center; } .login-art li i { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; font-style: normal; }
.login-art .brand { padding-left: 0; color: #fff; }
.login-form { display: grid; place-items: center; padding: 2rem 1.5rem; }
.login-card { width: min(400px, 100%); } .login-card h1 { font-size: 1.6rem; } .login-card .brand { color: var(--text); padding-left: 0; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ============ goals ============ */
.ltg { border-left: 5px solid var(--primary); } .ltg.inactive { border-left-color: var(--border-strong); opacity: .85; }
.ltg-text { font-weight: 600; font-size: 1.05rem; white-space: pre-wrap; }
.obj-list { margin-top: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.obj { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem .9rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.obj .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: .8rem; margin-top: 1px; }
.obj .text { white-space: pre-wrap; } .obj.inactive { opacity: .6; }
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; } .meter > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; } .meter.low > span { background: #d98a1c; } .meter.over > span { background: var(--bad); }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }

/* ============ live session ============ */
.session-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: .6rem 0 .7rem; margin: -.6rem 0 .9rem; }
.savestate { font-size: .8rem; color: var(--muted); display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; }
.savestate::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.savestate.err { color: var(--bad); font-weight: 600; } .savestate.err::before { background: var(--bad); } .savestate.saving { color: var(--warn); } .savestate.saving::before { background: #d98a1c; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ltg-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin: 1.5rem 0 .35rem; }
.ocard { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.1rem; position: relative; }
.ocard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--border-strong); transition: background .2s; } .ocard.hit::before { background: var(--good); } .ocard.has::before { background: var(--primary); }
.ocard-head { padding: 1.1rem 1.3rem .7rem 1.5rem; display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.ocard-head > div:first-child { min-width: 0; flex: 1; } .ocard-head .text { font-weight: 600; font-size: 1.02rem; white-space: pre-wrap; line-height: 1.4; }
.ring { --p: 0; width: 74px; height: 74px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: none; position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring.hit { background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring > div { position: relative; text-align: center; line-height: 1.05; } .ring .big { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .ring .sm { font-size: .68rem; color: var(--muted); font-weight: 600; }
.pct-badge { text-align: center; min-width: 78px; padding: .3rem .6rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.pct-badge .big { font-size: 1.5rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; } .pct-badge .sm { font-size: .72rem; color: var(--muted); }
.pct-badge.hit { background: var(--good-soft); border-color: transparent; } .pct-badge.hit .big { color: var(--good); }
.levels { display: flex; gap: .45rem; flex-wrap: wrap; padding: .2rem 1.3rem .75rem 1.5rem; }
.lvl { border: 1.5px solid var(--border-strong); background: var(--surface); border-radius: 99px; padding: .45rem .95rem; min-height: 40px; font-weight: 600; cursor: pointer; font-size: .9rem; transition: all .12s; }
.lvl:hover { border-color: var(--primary); color: var(--primary); } .lvl.on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--primary) 70%, transparent); }
.tapzone { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: .5rem; padding: 0 1.3rem .85rem 1.5rem; }
.tap { min-height: 40px; width: auto; min-width: 118px; padding: 0 .9rem; border-radius: 10px; border: 0; font-size: .9rem; font-weight: 750; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .6rem; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform .06s, filter .12s; position: relative; }
.tap:active { transform: scale(.97); filter: brightness(.95); } .tap:disabled { opacity: .5; }
.tap .cnt { background: rgba(255,255,255,.25); border-radius: 99px; min-width: 24px; padding: 0 .45rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.tap.yes { background: #16a34a; color: #fff; box-shadow: 0 4px 10px -6px rgba(22,163,74,.7); } .tap.no { background: #e5484d; color: #fff; box-shadow: 0 4px 10px -6px rgba(229,72,77,.7); }
.tap.undo { min-width: 0; padding: 0 .7rem; background: var(--surface-3); color: var(--muted); font-size: .8rem; flex-direction: column; gap: .1rem; box-shadow: none; }
.breakdown { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 1.3rem .85rem 1.5rem; font-size: .84rem; }
.bchip { display: inline-flex; align-items: center; gap: .35rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: .15rem .35rem .15rem .75rem; }
.bchip button { min-width: 26px; height: 24px; border: 0; background: var(--surface-3); border-radius: 99px; cursor: pointer; line-height: 1; padding: 0 .35rem; font-weight: 700; color: var(--muted); font-size: .75rem; } .bchip button:hover { color: var(--text); background: var(--border-strong); }
.statement { padding: .8rem 1.3rem 1.2rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.statement .field-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.statement textarea { min-height: 104px; background: var(--surface); }
.needs { color: var(--warn); font-weight: 600; font-size: .8rem; }
.actionbar { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .8rem 1rem; margin-top: 1.5rem; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; box-shadow: var(--shadow-sm); }
.sigpad { border: 2px dashed var(--border-strong); border-radius: 14px; background: #fff; touch-action: none; width: 100%; display: block; cursor: crosshair; }
.steps { display: flex; gap: .5rem; flex-wrap: wrap; } .step { display: flex; gap: .45rem; align-items: center; padding: .4rem .8rem; border-radius: 99px; border: 1px solid var(--border); font-size: .85rem; background: var(--surface); } .step.done { background: var(--good-soft); color: var(--good); border-color: transparent; font-weight: 600; } .step.next { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; } .chart text { fill: var(--muted); font-size: 11px; } .chart .grid { stroke: var(--border); } .chart .line { stroke: var(--primary); fill: none; stroke-width: 2.5; stroke-linejoin: round; } .chart .target { stroke: var(--good); stroke-dasharray: 5 4; stroke-width: 1.5; } .chart .ind { stroke: var(--info); fill: none; stroke-width: 1.5; stroke-dasharray: 2 3; }
.chart .pt { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; } .chart .bar { fill: var(--primary); }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; } .legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: .3rem; background: var(--primary); } .legend i.t { background: var(--good); } .legend i.i { background: var(--info); }
.pill-list { display: flex; flex-wrap: wrap; gap: .35rem; } code.tag { background: var(--surface-3); padding: .08rem .4rem; border-radius: 6px; font-size: .82rem; }
.rv-obj { border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; margin-bottom: .75rem; background: var(--surface); }
.rv-statement { margin-top: .6rem; padding: .65rem .85rem; background: var(--surface-2); border-radius: 10px; white-space: pre-wrap; border-left: 3px solid var(--primary); }
.cmt { border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; background: var(--surface-2); }
.cmt.correction_request { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.cmt.audit_approved { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-soft); }
.check-row { display: flex; gap: .65rem; align-items: flex-start; padding: .4rem 0; font-size: .92rem; }
.check-row .dot { flex: none; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; margin-top: 1px; }
.check-row.ok .dot { background: #16a34a; } .check-row.warn .dot { background: #d98a1c; } .check-row.error .dot { background: #e5484d; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, 1fr); gap: 1.4rem; align-items: start; } .split .side { position: sticky; top: 1rem; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } .split .side { position: static; } }
.rev { border-left: 3px solid var(--border-strong); padding: .2rem 0 .9rem 1rem; margin-left: .3rem; } .rev.current { border-left-color: var(--primary); }
.diff-old { background: var(--bad-soft); color: var(--bad); padding: 0 .3rem; border-radius: 4px; text-decoration: line-through; white-space: pre-wrap; } .diff-new { background: var(--good-soft); color: var(--good); padding: 0 .3rem; border-radius: 4px; white-space: pre-wrap; }
.sigimg { max-height: 70px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.success-hero { text-align: center; padding: 2.4rem 1.2rem; } .success-hero .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; margin: 0 auto 1rem; font-size: 2.2rem; font-weight: 800; animation: pop .35s cubic-bezier(.2,.9,.3,1.4); }
.tile { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.listrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .4rem; border-bottom: 1px solid var(--border); color: inherit; border-radius: 8px; } .listrow:last-child { border-bottom: 0; } a.listrow:hover { background: var(--surface-2); text-decoration: none; }
@media (max-width: 560px) { .tap.undo { flex-direction: row; min-height: 42px; } .ring { width: 58px; height: 58px; } .ring::before { inset: 6px; } .ring .big { font-size: .95rem; } .ring .sm { font-size: .6rem; } .levels { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; } .lvl { flex: none; scroll-snap-align: start; } .ocard-head { padding-right: 1rem; } .main { padding-left: .9rem; padding-right: .9rem; } }
@media print { .nav, .topbar, .tabbar, .actionbar, .toasts, .no-print { display: none !important; } .shell { display: block; } }
.tap { min-width: 0; }
@media (max-width: 860px) { .session-bar { top: 52px; background: var(--bg); margin-top: -.9rem; } }
@media (max-width: 560px) { .tap { font-size: .9rem; gap: .35rem; padding: 0 .8rem; min-height: 42px; } .tap .cnt { min-width: 24px; padding: 0 .4rem; } .tap.undo { min-width: 0; } .tapzone { padding-right: 1.1rem; } }
.levels { scroll-padding-left: 1.5rem; }
@media (max-width: 560px) { .session-bar .crumb, .session-bar .muted.small-text { display: none; } .session-bar { padding: .4rem 0; } }

.logo-img { height: 36px; width: auto; max-width: 150px; object-fit: contain; border-radius: 9px; background: #fff; padding: 3px; flex: none; box-shadow: 0 0 0 1px rgba(14,27,36,.08); }
.logo-img.logo-lg { height: 64px; max-width: 200px; } .logo.logo-lg { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 16px; }
.topbar .logo-img { height: 30px; } .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav .brand-name { white-space: normal; line-height: 1.15; overflow: visible; text-overflow: clip; }

.swatches { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); background: var(--sw); cursor: pointer; box-shadow: 0 0 0 1px var(--border-strong); padding: 0; position: relative; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--text); } .swatch:hover { transform: scale(1.08); }
.swatch.custom { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); display: grid; place-items: center; color: #fff; font-weight: 800; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; min-height: 0; padding: 0; border: 0; }
.swatch.custom span { text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }

.recip { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; background: var(--surface-2); }
/* ---------- invoice designer ---------- */
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.4rem; align-items: start; }
.dside { position: sticky; top: 1rem; }
.dpreview { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); background: #525659; overflow: hidden; box-shadow: var(--shadow); }
.dframe { width: 100%; height: calc(100vh - 8rem); min-height: 520px; border: 0; background: #525659; display: block; }
.dprev-busy { position: absolute; top: .6rem; right: .8rem; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; padding: .2rem .6rem; border-radius: 99px; z-index: 2; }
.dsec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: .7rem; box-shadow: var(--shadow-sm); }
.dsec > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 650; display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; list-style: none; } .dsec > summary::-webkit-details-marker { display: none; }
.dsec > summary::after { content: "▾"; color: var(--muted); margin-left: auto; } .dsec[open] > summary::after { content: "▴"; }
.dsec-body { padding: .2rem 1rem 1rem; border-top: 1px solid var(--border); padding-top: .9rem; }
@media (max-width: 980px) { .dgrid { grid-template-columns: 1fr; } .dside { position: static; order: -1; } .dframe { height: 60vh; min-height: 380px; } }

/* ---------- calendar ---------- */
.cal { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head > div { padding: .55rem .6rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 112px; padding: .3rem .35rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; } .cal-cell:hover { background: var(--surface-2); } .cal-cell.other { background: var(--surface-2); } .cal-cell.other .cal-num { color: var(--faint); }
.cal-num { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 .2rem; } .cal-cell.today .cal-num { color: var(--primary-text); background: var(--primary); border-radius: 99px; display: inline-block; width: fit-content; padding: 0 .45rem; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.cal-week .cal-cell.tall { min-height: 360px; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--primary); background: var(--primary-soft); color: var(--text); border-radius: 6px; padding: .14rem .4rem; font-size: .76rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.ev b { font-weight: 650; } .ev:hover { filter: brightness(.96); }
.ev-appointment, .ev-shift { background: var(--info-soft); border-left-color: var(--info); border-left-style: dashed; } .ev-entry { background: var(--good-soft); border-left-color: var(--good); } .ev-task { background: var(--warn-soft); border-left-color: var(--warn); }
.ev.st-cancelled { text-decoration: line-through; opacity: .55; } .ev.st-draft { background: var(--warn-soft); border-left-color: var(--warn); } .ev.st-billed { opacity: .65; } .ev.st-logged { opacity: .9; } .ev.st-done { opacity: .6; text-decoration: line-through; }
.ev.more { background: transparent; border-left: 0; color: var(--muted); font-weight: 600; }
.chip-btn { border: 0; border-radius: 99px; padding: .18rem .65rem; font-size: .76rem; font-weight: 600; cursor: pointer; border-left: 0 !important; width: auto; } .chip-btn.off { opacity: .4; text-decoration: line-through; }
@media (max-width: 860px) { .cal-cell { min-height: 74px; } .ev b { display: none; } }
@media (max-width: 640px) { .cal-head > div { padding: .4rem .2rem; font-size: .62rem; text-align: center; } .cal-cell { min-height: 58px; padding: .15rem; } .ev { font-size: .64rem; padding: 0 .2rem; } .cal-week { grid-template-columns: 1fr; } .cal-week .cal-cell.tall { min-height: 0; } }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; align-items: start; padding-bottom: 1rem; }
.kcol { min-width: 0; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-lg); padding: .6rem; scroll-snap-align: start; transition: background .12s, box-shadow .12s;  display: flex; flex-direction: column; min-width: 0; }
.kcol.over { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary) inset; }
.kcol-new { background: transparent; border-style: dashed; padding: .6rem; max-height: none; }
.khead { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .25rem .4rem .6rem; } .kcount { background: var(--surface); border-radius: 99px; padding: 0 .55rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.kbody { display: flex; flex-direction: column; gap: .5rem; min-height: 60px; padding: 2px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .65rem .75rem; box-shadow: var(--shadow-sm); cursor: grab; position: relative; }
.kcard:hover { box-shadow: var(--shadow); border-color: var(--border-strong); } .kcard.dragging { opacity: .45; transform: rotate(1.5deg); } .kcard.overdue { border-left: 4px solid var(--bad); }
.kcard.k-session, .kcard.k-timesheet { border-left: 4px solid var(--primary); } .kcard.k-invoice { border-left: 4px solid var(--info); } .kcard.k-task { border-left: 4px solid var(--warn); }
.ktitle { font-weight: 650; line-height: 1.3; } .ksub { font-size: .82rem; color: var(--muted); } .kbadges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.kempty { color: var(--faint); text-align: center; font-size: .85rem; padding: 1rem .5rem; border: 1.5px dashed var(--border-strong); border-radius: 10px; }
.kmove { margin-top: .5rem; min-height: 32px; font-size: .8rem; padding: .2rem .4rem; display: none; } .kcard:hover .kmove, .kcard:focus-within .kmove { display: block; } @media (hover: none) { .kmove { display: block; } }
.kadd input { min-height: 38px; background: var(--surface); } .kcol-new input { background: transparent; }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }

/* type of prompt chips */
.cuerow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: 0 1.3rem .65rem 1.5rem; }
.cuechip { border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 99px; padding: .25rem .8rem; font-size: .84rem; font-weight: 600; cursor: pointer; min-height: 34px; }
.cuechip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text-strong, var(--primary)); }

/* forms & fields builder */
.fixed-fields { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .4rem; }
.fieldrow { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fieldrow.off { opacity: .55; }
.fb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; } @media (max-width: 760px) { .fb-grid { grid-template-columns: 1fr; } }
.fb-preview { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 1rem; background: var(--surface-2); }
.typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.typecard { text-align: left; border: 1.5px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: .6rem .75rem; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; font: inherit; color: var(--text); }
.typecard span { font-size: .78rem; color: var(--muted); } .typecard.on { border-color: var(--primary); background: var(--primary-soft); }
.chip-btn.quick { background: var(--surface-3); color: var(--text); border: 1px dashed var(--border-strong) !important; }
.custom-fields { margin-top: .4rem; }

/* drag-and-drop form maker */
.maker { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .maker { grid-template-columns: 220px minmax(0, 1fr); } .maker-props { grid-column: 1 / -1; } }
@media (max-width: 720px) { .maker { grid-template-columns: 1fr; } }
.maker-pal, .maker-props { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
@media (max-width: 720px) { .maker-pal, .maker-props { position: static; max-height: none; } }
.pal-list { display: flex; flex-direction: column; gap: .4rem; }
.pal-item { display: flex; align-items: center; gap: .65rem; text-align: left; width: 100%; border: 1.5px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: .5rem .65rem; cursor: grab; font: inherit; color: var(--text); min-height: 44px; }
.pal-item:hover { border-color: var(--primary); background: var(--primary-soft); } .pal-item small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.25; } .pal-item strong { font-size: .88rem; }
.pal-item.ready { border-style: dashed; }
.pal-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: .78rem; color: var(--primary); }
.form-paper { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; min-height: 280px; }
.core-group { display: flex; flex-direction: column; gap: .4rem; }
.core-card { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-3); padding: .5rem .8rem; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.core-card.static { cursor: default; } .core-card.sel { border-color: var(--primary); }
.drop-list { display: flex; flex-direction: column; gap: .5rem; min-height: 80px; }
.drop-empty { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 1.6rem 1rem; text-align: center; color: var(--muted); } .drop-empty.over { border-color: var(--primary); background: var(--primary-soft); }
.drop-line { height: 4px; border-radius: 4px; background: var(--primary); margin: -2px 0 4px; }
.block-card { display: flex; align-items: flex-start; gap: .6rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: .55rem .7rem; cursor: grab; }
.block-card:hover { border-color: var(--border-strong); } .block-card.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.grip { color: var(--faint); font-size: 1.3rem; line-height: 1.6; user-select: none; }
.block-preview { flex: 1; min-width: 0; pointer-events: none; } .block-preview .field { margin-bottom: 0; }
.block-actions { display: flex; gap: .1rem; flex: none; }
.typegrid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } .typegrid.small .typecard { padding: .4rem .6rem; }
.props .field { margin-bottom: .8rem; }

/* calendar: strong color-coded highlights */
.ev.colored { background: var(--c, var(--primary)); color: #fff; border-left: 4px solid rgba(0,0,0,.28); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.ev.colored:hover { filter: brightness(1.08); }
.ev.colored.st-cancelled { background: repeating-linear-gradient(45deg, var(--c), var(--c) 6px, rgba(0,0,0,.25) 6px, rgba(0,0,0,.25) 8px); }
.ev.colored.dim { opacity: .18; filter: grayscale(.6); } .ev.colored.hit { outline: 3px solid var(--text); outline-offset: 1px; z-index: 1; position: relative; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: -.2rem 0 .8rem; }
.lg { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600; cursor: pointer; width: auto; }
.lg i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); display: inline-block; }
.lg.on { background: var(--c); color: #fff; border-color: var(--c); } .lg.on i { background: #fff; } .lg.clear { border-style: dashed; color: var(--muted); }
.cal-cell.today { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); box-shadow: inset 0 0 0 2px var(--primary); }

.prev { display: block; font-size: .8rem; color: var(--muted); margin-top: .1rem; } .prev .good { color: var(--good, #15803d); }

/* printable progress report */
.pr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.2rem; }
.pr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--primary); padding-bottom: .6rem; margin-bottom: 1rem; }
.pr-locname { margin: 1rem 0 .5rem; font-size: 1.15rem; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.pr-client { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; margin-bottom: .8rem; break-inside: avoid; }
.pr-cname { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; margin-bottom: .5rem; }
.pr-objs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .9rem; }
.pr-obj { break-inside: avoid; } .pr-otext { font-size: .82rem; font-weight: 600; line-height: 1.3; }
.pr-stats { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .74rem; margin: .2rem 0; } .pr-stats b { font-size: .9rem; }
@media (max-width: 700px) { .pr-objs { grid-template-columns: 1fr; } }
@media print {
  @page { margin: 12mm; }
  .nav, .topbar, .tabbar, .no-print, .scrim, .toasts { display: none !important; }
  .shell { display: block !important; } .main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body { background: #fff !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr { border: 0; padding: 0; background: #fff; }
  .pr-loc { break-before: page; } .pr-loc:first-of-type { break-before: auto; }
  .pr-objs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* quick dashboards: condensed, bookmarkable screens */
.quick-shell { min-height: 100vh; background: var(--bg); }
.quick-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.quick-tabs { display: flex; gap: .3rem; } .quick-tabs a { padding: .4rem .9rem; border-radius: 99px; font-weight: 650; color: var(--muted); position: relative; text-decoration: none; }
.quick-tabs a.on { background: var(--primary); color: #fff; } .quick-tabs .dot { position: static; margin-left: .35rem; background: var(--bad); color: #fff; border-radius: 99px; font-size: .7rem; padding: 0 .4rem; }
.quick-main { max-width: 980px; margin: 0 auto; padding: 1rem; }
.savelink { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: -.4rem 0 1rem; }
.qcard { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; } .qcard.picked { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.qrow { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; min-height: 52px; } a.qrow.link { text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); } a.qrow.link:hover { border-color: var(--primary); }
.qmain { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; } .qmain strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qdetail { border-top: 1px solid var(--border); padding: .8rem 1rem; background: var(--surface-2); max-height: 60vh; overflow: auto; }
.qbar { position: sticky; top: 3.6rem; z-index: 20; display: flex; flex-direction: column; gap: .6rem; }
@media (max-width: 640px) { .hide-sm { display: none; } .qrow { flex-wrap: wrap; } .qmain { flex-basis: 60%; } }

/* compact list mode: one line per card, so every column stays short */
.board-wrap.dense .kanban { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .7rem; }
.board-wrap.dense .kcol { padding: .4rem; } .board-wrap.dense .khead { padding: .15rem .35rem .4rem; }
.board-wrap.dense .kbody { gap: .25rem; }
.board-wrap.dense .kcard { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; border-radius: 8px; box-shadow: none; }
.board-wrap.dense .ktitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.board-wrap.dense .ksub { display: none; } .board-wrap.dense .kbadges { margin: 0; flex: none; flex-wrap: nowrap; }
.board-wrap.dense .kmove { margin: 0; width: auto; max-width: 92px; min-height: 26px; font-size: .72rem; padding: 0 .2rem; }
.board-wrap.dense .kempty { padding: .4rem; font-size: .78rem; }

/* calendar: the fill identifies the place; status is a stripe and a corner glyph */
.ev.colored { position: relative; background: color-mix(in srgb, var(--c, #94a3b8) 24%, var(--surface)); color: var(--text); border: 0; border-left: 4px solid color-mix(in srgb, var(--c, #94a3b8) 55%, transparent); padding-right: 1.35rem; font-weight: 600; box-shadow: none; }
.ev.colored.has-st { border-left: 4px solid var(--st); }
.ev.colored.st-dashed { border-left-style: dashed; }
.ev.colored .glyph { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); font-size: .7rem; line-height: 1; }
.ev.colored.st-cancelled { background: color-mix(in srgb, var(--c, #94a3b8) 10%, var(--surface)); text-decoration: line-through; opacity: .6; }
.ev.colored.dim { opacity: .2; filter: grayscale(.5); } .ev.colored.hit { outline: 3px solid var(--text); outline-offset: 1px; }
.lg.st i { width: 4px; height: 14px; border-radius: 2px; } .lg.st i.dash { background: repeating-linear-gradient(180deg, var(--c) 0 3px, transparent 3px 5px); }
.lg.st.on { background: var(--surface-3); color: var(--text); border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); } .lg.st.on i { background: var(--c); }
.swatches.loc { display: flex; gap: .4rem; flex-wrap: wrap; }

/* recertification hub and my tasks */
.hub-meter-top { font-size: .86rem; margin-bottom: .25rem; }
.hub-bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .hub-bar > div { height: 100%; border-radius: 99px; background: var(--good, #16a34a); }
.hub-bar.warn > div { background: var(--warn, #d97706); } .hub-bar.bad > div { background: var(--bad, #dc2626); }
.hub-due-date { font-size: 1.5rem; font-weight: 750; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.comm { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; background: var(--surface); } .comm.void { opacity: .55; text-decoration: line-through; }
.vault-add { border: 1px dashed var(--border-strong); border-radius: 12px; padding: .8rem; background: var(--surface-2); }
.hub-hist summary { cursor: pointer; padding: .3rem 0; } .hub-hist { border-bottom: 1px solid var(--border); padding: .2rem 0; }
.locdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.taskrow { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border-strong); border-radius: 12px; text-decoration: none; color: inherit; min-height: 56px; }
.taskrow:hover { border-color: var(--primary); } .taskrow.sev-overdue { border-left-color: #dc2626; background: color-mix(in srgb, #dc2626 5%, var(--surface)); } .taskrow.sev-warn { border-left-color: #d97706; }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tr-go { color: var(--faint); }
.alert.error, .alert.warn, .alert.info { margin: 0; }

.modecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .7rem; }
.modecard { text-align: left; border: 2px solid var(--border-strong); background: var(--surface); border-radius: 14px; padding: .8rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; font: inherit; color: var(--text); }
.modecard span { font-size: .82rem; color: var(--muted); } .modecard.on { border-color: var(--primary); background: var(--primary-soft); }
.chip-x { border: 0; background: transparent; cursor: pointer; font-weight: 700; padding: 0 .2rem; color: inherit; width: auto; }

.boot-card { max-width: 480px; margin: 12vh auto; padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); } .boot-card h1 { margin-top: 0; }
