:root {
  color-scheme: light;
  --canvas: #f4f5f8;
  --surface: #fff;
  --ink: #111318;
  --muted: #555d6e;
  --soft: #636e83;
  --line: #e2e5ec;
  --navy: #111318;
  --blue: #1a3cff;
  --blue-hover: #1633d2;
  --blue-50: #ebefff;
  --shadow: 0 1px 2px #11131806, 0 8px 24px #31374f08;
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #6b86ff; outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: Geologica, "Golos Text", "Segoe UI", system-ui, sans-serif; font-size: clamp(2rem, 4.5vw, 3.05rem); line-height: 1.1; letter-spacing: -.06em; font-weight: 760; }
h2 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.022em; }
h3 { font-size: 1rem; line-height: 1.35; }
p { line-height: 1.5; }
small { line-height: 1.4; }
.visually-hidden { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); position: absolute; white-space: nowrap; }
.boot { display: grid; place-content: center; min-height: 100vh; font-size: 1.65rem; letter-spacing: .03em; font-weight: 800; }
.boot span { font-size: .8rem; color: var(--muted); text-align: center; }
.brand { display: inline-flex; align-items: center; gap: .68rem; color: inherit; font: 750 1.38rem/1 Geologica, "Golos Text", "Segoe UI", sans-serif; letter-spacing: .06em; white-space: nowrap; }
.brand small { margin-left: .25rem; font-size: .65rem; font-weight: 600; letter-spacing: .05em; vertical-align: middle; opacity: .65; }
.brand-mark { display: block; width: 2rem; height: 2rem; flex: none; }
.mark-accent { fill: var(--blue); }
.icon { display: inline-block; position: relative; width: 1rem; height: 1rem; color: inherit; flex: none; }
.icon::before, .icon::after { position: absolute; box-sizing: border-box; }
.icon-grid::before { content: ""; left: 1px; top: 1px; width: 6px; height: 6px; border-radius: 1px; border: 1px solid; box-shadow: 8px 0, 0 8px, 8px 8px; }
.icon-people::before { content: ""; width: 6px; height: 6px; left: 4px; top: 1px; border: 1px solid; border-radius: 50%; }
.icon-people::after { content: ""; width: 12px; height: 6px; left: 1px; bottom: 1px; border: 1px solid; border-radius: 7px 7px 2px 2px; }
.icon-inbox::before { content: ""; inset: 3px 1px 2px; border: 1px solid; border-radius: 3px; }
.icon-inbox::after { content: ""; left: 5px; top: 3px; width: 6px; height: 5px; border: 1px solid; border-top: 0; border-radius: 0 0 3px 3px; }
.icon-wallet::before { content: ""; inset: 2px 1px; border: 1px solid; border-radius: 3px; }
.icon-wallet::after { content: ""; right: 1px; height: 5px; width: 6px; top: 6px; border: 1px solid; border-right: 0; border-radius: 2px 0 0 2px; }
.icon-shield::before { content: ""; inset: 1px 2px; border: 1px solid; border-radius: 5px 5px 8px 8px; }
.icon-shield::after, .icon-check::after { content: ""; height: 5px; width: 8px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); left: 4px; top: 5px; }
.icon-check::before, .icon-clock::before { content: ""; inset: 1px; border: 1px solid; border-radius: 50%; }
.icon-clock::after { content: ""; top: 4px; left: 7px; border-left: 1px solid; border-bottom: 1px solid; width: 4px; height: 5px; }
.icon-percent::before { content: "%"; inset: 0; font-style: normal; font-weight: 750; line-height: 1; text-align: center; }
.icon-plus::before, .icon-plus::after { content: ""; background: currentColor; border-radius: 2px; top: 7px; left: 2px; width: 12px; height: 2px; }
.icon-plus::after { transform: rotate(90deg); }
.icon-search::before { content: ""; width: 10px; height: 10px; left: 1px; top: 1px; border: 1.5px solid; border-radius: 50%; }
.icon-search::after { content: ""; height: 1.5px; width: 6px; border-radius: 2px; background: currentColor; transform: rotate(46deg); left: 9px; top: 11px; }
.icon-bell::before { content: ""; width: 11px; height: 10px; top: 2px; left: 2px; border: 1.5px solid; border-radius: 6px 6px 2px 2px; }
.icon-bell::after { content: ""; height: 2px; width: 4px; border-radius: 3px; bottom: 1px; left: 6px; background: currentColor; }
.icon-menu::before { content: ""; height: 1.5px; width: 13px; top: 3px; left: 1px; background: currentColor; box-shadow: 0 4px, 0 8px; }
.icon-note::before { content: ""; inset: 1px 2px; border: 1px solid; border-radius: 2px; }
.icon-note::after { content: ""; top: 5px; left: 5px; width: 6px; height: 1px; background: currentColor; box-shadow: 0 3px, 0 6px; }
.layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 1.6rem 1rem 1rem; background: var(--navy); color: #fff; z-index: 5; }
.sidebar > .brand { padding: .2rem .65rem 0; }
.sidebar nav { display: grid; gap: .35rem; margin-top: 2.8rem; }
.nav-item, .profile { width: 100%; display: flex; align-items: center; gap: .75rem; border: 0; border-radius: .65rem; background: transparent; text-align: left; }
.nav-item { min-height: 2.75rem; padding: .7rem .75rem; color: #c1c5d0; font-size: .89rem; font-weight: 620; }
.nav-item:hover, .profile:hover { background: #ffffff12; color: white; }
.nav-item.selected { color: #fff; background: var(--blue); box-shadow: 0 6px 16px #0004; }
.nav-item .icon { color: #adbadf; }
.nav-item.selected .icon { color: #fff; }
.nav-balance { align-items: flex-start; margin-top: .42rem; padding: .8rem .75rem; border: 1px solid #ffffff20; background: #ffffff08; }
.nav-balance > .icon { margin-top: .08rem; }
.nav-balance-copy { display: grid; min-width: 0; gap: .26rem; }
.nav-balance-copy > strong { color: #fff; font-size: 1.22rem; line-height: 1.15; letter-spacing: -.025em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; }
.demo-mode { display: inline-flex; align-items: center; gap: .42rem; padding: .28rem .55rem; margin: 0 0 .75rem .55rem; font-size: .78rem; color: #cad6ef; background: #ffffff12; border-radius: .35rem; }
.demo-mode > span { width: .35rem; height: .35rem; border-radius: 100%; background: #9cb4ff; }
.profile { border-top: 1px solid #ffffff18; border-radius: 0; padding: .85rem .4rem .4rem; }
.profile > span:last-child { display: grid; gap: .2rem; min-width: 0; }
.profile strong { font-size: .87rem; overflow-wrap: anywhere; }
.profile small { font-size: .77rem; color: #b6c3de; }
.profile .avatar { color: #e5e9ff; background: #293461; }
.menu-scrim { display: none; }
.workspace { min-width: 0; }
.topbar { display: flex; position: relative; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.45rem; padding: .7rem clamp(1rem, 3vw, 2.7rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: .75rem; }
.topbar-left { color: var(--muted); font-size: .9rem; }
.topbar-left strong { color: var(--ink); font-weight: 650; }
.breadcrumb-separator { color: #9aa7bd; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 2.4rem; min-width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); color: var(--muted); }
.icon-button:hover, .top-profile:hover { background: var(--blue-50); color: var(--blue); }
.icon-button b { position: absolute; background: #3456ef; top: .46rem; right: .46rem; width: .45rem; height: .45rem; border-radius: 50%; outline: 2px solid white; }
.top-profile { border: 0; padding: 0; background: transparent; border-radius: 50%; }
.top-profile .avatar { width: 2.4rem; height: 2.4rem; }
.mobile-menu { display: none; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: .68rem; background: #edf1ff; color: #334db5; font-size: .73rem; font-weight: 750; letter-spacing: .02em; }
.content { max-width: 1500px; margin-inline: auto; padding: 1.7rem clamp(1rem, 3vw, 2.7rem) 3.5rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; margin-bottom: 1.55rem; }
.page-heading p { margin-top: .52rem; color: var(--muted); }
.overview-hero { position: relative; isolation: isolate; overflow: hidden; margin-bottom: 1rem; padding: clamp(1.2rem, 3vw, 2.3rem); color: white;
  border-radius: 1.15rem; background: radial-gradient(ellipse at 100% 20%, #27366c 0, transparent 56%), #111318; }
.overview-hero .page-heading { align-items: start; gap: .85rem; margin-bottom: 1.25rem; }
.overview-hero .page-heading p { color: #c6ccdb; }
.overview-hero .dashboard-toolbar { margin-bottom: 0; }
.overview-hero .date-caption { color: #e0e4ef; }
.overview-hero select, .overview-hero input, .overview-hero .button.secondary { border-color: #505a77; background-color: #202638; color: #f5f6fc; color-scheme: dark; }
.overview-hero select { background-image: linear-gradient(45deg, transparent 50%, #c2cae0 50%), linear-gradient(135deg, #c2cae0 50%, transparent 50%); }
.overview-hero .report-controls label:not(.visually-hidden) { color: #e0e4ef; }
.hero-mark { position: absolute; z-index: -1; pointer-events: none; width: clamp(13rem, 37%, 24rem); right: -.5rem; top: 50%;
  transform: translateY(-51%) rotate(-11deg); color: #828efa45; }
.hero-mark .mark-accent { fill: #4d66ffab; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; flex: none; min-height: 2.5rem; padding: .55rem .82rem; border-radius: .58rem; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 660; line-height: 1.15; text-align: center; }
.button.primary { border-color: var(--blue); background: var(--blue); color: white; box-shadow: 0 3px 8px #1a3cff23; }
.button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button.secondary:hover { background: #f7f9ff; border-color: #9eafe4; }
.button.plain { background: transparent; border-color: transparent; color: var(--blue); }
.button.plain:hover { background: var(--blue-50); }
.dashboard-toolbar { display: flex; align-items: center; justify-content: flex-start; min-height: 2.35rem; margin-bottom: 1rem; }
.date-caption { color: var(--muted); font-size: .9rem; font-weight: 650; }
.report-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.report-controls label:not(.visually-hidden) { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--muted); }
input, select, textarea { width: 100%; min-width: 0; color: var(--ink); border: 1px solid #d6dfef; border-radius: .53rem; background-color: var(--surface); padding: .55rem .65rem; min-height: 2.5rem; font-size: .92rem; }
input::placeholder, textarea::placeholder { color: #687895; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 1.7rem; background-image: linear-gradient(45deg, transparent 50%, #57657f 50%), linear-gradient(135deg, #57657f 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.report-controls input, .report-controls select { width: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .92rem; margin-bottom: 1.2rem; }
.manager-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: grid; align-content: space-between; gap: .62rem; padding: 1.08rem; min-width: 0; min-height: 7.45rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: .48rem; min-height: 2rem; color: var(--muted); font-size: .88rem; font-weight: 590; }
.stat-icon { display: inline-grid; flex: none; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .52rem; color: #244bc8; background: #eaf0ff; }
.stat-icon.amber { color: #875900; background: #fff2d9; }
.stat-icon.purple { color: #613daf; background: #f1eaff; }
.stat-icon.green { color: #1a7556; background: #e5f7ee; }
.stat > strong { font-size: clamp(1.45rem, 2.75vw, 2.15rem); letter-spacing: -.05em; line-height: 1.1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat > small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 1.02rem; margin-bottom: 1.02rem; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.content > .panel { margin-bottom: 1.02rem; }
.panel-top { padding: 1.1rem 1.15rem .8rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.panel-top p { margin-top: .25rem; color: var(--muted); font-size: .86rem; }
.panel-top .button { min-height: 2rem; }
.funnel { display: grid; gap: .96rem; padding: .45rem 1.15rem 1.25rem; }
.funnel-row { display: grid; gap: .33rem; }
.funnel-row div { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; color: var(--muted); }
.funnel-row strong { color: var(--ink); }
progress { display: block; width: 100%; height: .46rem; appearance: none; border: 0; border-radius: 1rem; background: #edf1f8; color: var(--fill); }
progress::-webkit-progress-bar { background: #edf1f8; border-radius: 1rem; }
progress::-webkit-progress-value { background: var(--fill); border-radius: 1rem; }
progress::-moz-progress-bar { background: var(--fill); border-radius: 1rem; }
.progress-sent { --fill: var(--blue); }
.progress-talking { --fill: #7760cc; }
.progress-handoff { --fill: #d89022; }
.progress-paid { --fill: #2f9b76; }
.compact-list { padding: .1rem .9rem .8rem; }
.compact-item { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .62rem; border: 0; background: transparent; border-bottom: 1px solid #eef1f7; padding: .58rem .25rem; text-align: left; }
.compact-item:last-child { border-bottom: 0; }
.compact-item:hover { background: #f7f9ff; }
.compact-item > span:nth-child(2) { display: grid; gap: .16rem; }
.compact-item strong { font-size: .91rem; overflow-wrap: anywhere; }
.compact-item small { font-size: .8rem; color: var(--muted); }
.overdue, .compact-item .overdue { color: #a33246; }
.empty { display: grid; justify-items: center; gap: .45rem; padding: 2rem 1.1rem; color: var(--ink); text-align: center; }
.empty strong { font-size: .96rem; }
.empty p { color: var(--muted); font-size: .89rem; max-width: 24rem; }
.empty-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .58rem; color: #3f5cc0; background: #edf2ff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
th, td { border-top: 1px solid var(--line); padding: .74rem .72rem; }
th { background: #f7f9fe; font-weight: 650; color: #51617e; white-space: nowrap; font-size: .83rem; }
th:first-child, td:first-child { padding-left: 1.15rem; }
th:last-child, td:last-child { padding-right: 1.15rem; }
td strong { font-weight: 680; }
tr:hover td { background: #fafbff; }
.cell-person { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.cell-person > span:last-child { display: grid; gap: .12rem; min-width: 0; }
.cell-person strong { overflow-wrap: anywhere; }
.cell-person small, .cell-note { display: block; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.row-link { padding: 0; margin: 0; background: transparent; border: 0; text-align: left; font-weight: 680; }
.row-link:hover strong { text-decoration: underline; color: var(--blue); }
.client-table .row-link { min-width: 11rem; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 660; }
.badge, .status-select { --status-ink: #515f79; --status-paper: #edf1f6; color: var(--status-ink); background-color: var(--status-paper); }
.badge { display: inline-flex; align-items: center; padding: .27rem .5rem; border-radius: .45rem; font-size: .8rem; font-weight: 650; line-height: 1.22; white-space: nowrap; }
:is(.badge, .status-select).blue { --status-ink: #2949ac; --status-paper: #e9f0ff; }
:is(.badge, .status-select).purple { --status-ink: #59379e; --status-paper: #f0eaff; }
:is(.badge, .status-select).amber { --status-ink: #795200; --status-paper: #fff1d3; }
:is(.badge, .status-select).green { --status-ink: #176247; --status-paper: #e0f5e9; }
:is(.badge, .status-select).rose { --status-ink: #a0364d; --status-paper: #fcecf0; }
.status-select { width: 100%; max-width: 15.5rem; min-height: 2.2rem; padding-block: .4rem; border-color: color-mix(in srgb, var(--status-ink) 22%, transparent);
  font-size: .85rem; font-weight: 650; cursor: pointer; text-overflow: ellipsis; }
.status-select:hover { border-color: var(--status-ink); }
.status-select option { color: var(--ink); background: var(--surface); }
.client-table th:nth-child(2) { width: 24%; }
.client-status { display: grid; justify-items: start; gap: .25rem; width: min(100%, 14rem); }
.client-status > span:first-child { font-size: .79rem; font-weight: 640; color: var(--muted); }
.queue-action { text-align: right; }
.queue-action .button { min-height: 2.2rem; }
.reason { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .7rem 1.15rem; border-top: 1px solid var(--line); }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .9rem 1rem; }
.table-toolbar select { width: auto; max-width: 100%; }
.search { display: flex; align-items: center; position: relative; flex: 1 1 15rem; }
.search .icon { position: absolute; left: .65rem; color: var(--muted); pointer-events: none; }
.search input { padding-left: 2rem; }
.notification-panel { position: absolute; z-index: 9; right: 1.05rem; top: calc(100% - .25rem); width: min(24rem, calc(100vw - 2.1rem)); max-height: min(32rem, 72vh); overflow: auto; background: var(--surface); border-radius: .82rem; border: 1px solid var(--line); box-shadow: 0 12px 32px #101a3924; }
.notification { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: baseline; width: 100%; background: var(--surface); border: 0; border-top: 1px solid var(--line); padding: .7rem 1.15rem; text-align: left; font-size: .9rem; }
.notification:hover, .notification.unread { background: #f4f7ff; }
.notification small { display: block; color: var(--muted); font-size: .79rem; margin-top: .15rem; }
.notice-dot { display: inline-block; width: .38rem; height: .38rem; background: #c5d0e6; border-radius: 50%; }
.unread .notice-dot { background: var(--blue); }
.payout-list { padding: .15rem 1.15rem 1.1rem; }
.payout { border-top: 1px solid var(--line); }
.payout summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .65rem; cursor: pointer; padding: .65rem .05rem; }
.payout summary small { display: block; color: var(--muted); margin-top: .15rem; }
.payout-detail { display: grid; gap: .5rem; padding: .1rem 0 .9rem; color: var(--muted); }
.payout-line { display: flex; justify-content: space-between; gap: .65rem; align-items: center; border: 1px solid var(--line); border-radius: .45rem; padding: .5rem; }
.team-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: .85rem; padding: .2rem 1.15rem 1.15rem; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .78rem; padding: .25rem 1.15rem 1.15rem; }
.template-card { display: flex; flex-direction: column; gap: .65rem; padding: .9rem; border: 1px solid var(--line); border-radius: .72rem; background: #f8f9fd; }
.template-card h3 { overflow-wrap: anywhere; }
.template-card .actions { margin-top: auto; padding-top: .15rem; }
.template-message { color: var(--muted); max-block-size: 11rem; overflow: auto; font-size: .92rem; }
.template-card-wide { grid-column: 1 / -1; }
.template-card-wide .template-message { max-block-size: none; }
.team-card { border: 1px solid var(--line); border-radius: .78rem; padding: .85rem; min-width: 0; }
.team-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; }
.team-rate { display: grid; gap: .2rem; margin: .9rem 0; padding: .75rem; background: #f5f7ff; border-radius: .59rem; font-size: .87rem; color: var(--muted); }
.team-rate strong { color: var(--ink); font-size: 1.4rem; }
.rate-history { color: var(--muted); font-size: .86rem; margin-top: .7rem; }
.rate-history summary { cursor: pointer; }
.rate-history > div { display: flex; justify-content: space-between; gap: .55rem; padding-top: .45rem; }
dialog { width: min(31rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 0; border: 1px solid var(--line); border-radius: .95rem; color: var(--ink); background: var(--surface); box-shadow: 0 18px 64px #111c3e40; }
dialog::backdrop { background: #101a3975; }
dialog.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 36rem); max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: .95rem 0 0 .95rem; }
.dialog-heading { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-heading h2 { overflow-wrap: anywhere; }
.dialog-heading .close { font-size: 1.3rem; }
.modal-form, .drawer-content { padding: 1.1rem 1.15rem 1.3rem; }
.fields { display: grid; gap: .85rem; }
.fields label { display: grid; gap: .38rem; font-size: .9rem; font-weight: 650; }
.form-message, .modal-form > p { font-size: .92rem; color: var(--muted); }
.form-error { font-size: .9rem; color: #a52f44 !important; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .46rem; margin-top: .38rem; }
.actions a.button { text-decoration: none; }
.drawer-content > .actions { margin-top: .85rem; }
.drawer-feedback { margin-top: .7rem; }
.drawer-section { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.drawer-section h3 { margin-bottom: .56rem; }
.drawer-section p { font-size: .9rem; color: var(--muted); }
.journal-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem; margin-bottom: .65rem; }
.journal-heading h3 { margin: 0; }
.journal-list { display: grid; gap: .5rem; max-block-size: 19rem; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.journal-list li { padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .55rem; background: #f8f9fd; }
.journal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin-bottom: .38rem; }
.journal-meta small { color: var(--muted); }
.client-summary { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.detail-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .38rem; margin-top: .4rem; }
.detail-inline strong { color: var(--ink); }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.deal-card { display: grid; gap: .35rem; margin-top: .55rem; padding: .75rem; border: 1px solid var(--line); border-radius: .62rem; }
.deal-title { display: flex; justify-content: space-between; align-items: start; gap: .5rem; }
.deal-title div { min-width: 0; overflow-wrap: anywhere; }
.deal-title small { display: block; color: var(--muted); font-size: .79rem; margin-top: .15rem; }
.return-note { margin: .25rem 0; padding: .5rem; background: #fff7e7; border-radius: .4rem; }
.inline-count { color: var(--muted); margin-left: .2rem; font-size: .85rem; font-weight: 550; }
.timeline { display: grid; gap: .65rem; list-style: none; padding: 0; }
.timeline li { border-left: 2px solid #dce5ff; padding-left: .6rem; }
.timeline li > div { display: grid; gap: .15rem; font-size: .9rem; }
.timeline small { color: var(--muted); }
.credentials { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .4rem .7rem; color: var(--muted); }
.credentials dd { margin: 0; font-weight: 750; color: var(--ink); overflow-wrap: anywhere; }
.password-required { margin: 10vh auto; width: min(calc(100% - 2rem), 34rem); padding: 1.5rem; border-radius: .9rem; background: var(--surface); display: grid; justify-items: start; gap: 1rem; }
.agreement-required p { color: var(--muted); }
.agreement-required form { width: 100%; }
.fields .agreement-consent { display: flex; align-items: flex-start; gap: .6rem; }
.agreement-consent input { flex: 0 0 1.15rem; width: 1.15rem; min-height: 0; height: 1.15rem; margin: .1rem 0 0; padding: 0; accent-color: var(--blue); }
#toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); padding: .65rem .95rem; max-width: min(90vw, 32rem); border-radius: .6rem; color: white; background: #233e93; box-shadow: var(--shadow); z-index: 20; }
#toast.error { background: #9b3348; }
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(26rem, .9fr) 1.1fr; }
.login-brand { min-width: 0; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 4rem; padding: clamp(2rem, 5vw, 5rem); color: #f5f7ff; background: radial-gradient(ellipse at 96% 35%, #262f61, transparent 68%), #111318; }
.login-brand h1 { max-width: 26rem; font-size: clamp(2rem, 5vw, 3.75rem); }
.login-brand p { margin-top: .85rem; color: #bfcced; }
.login-graphic { position: absolute; z-index: -1; pointer-events: none; top: 46%; left: 63%; width: clamp(16rem, 38vw, 34rem); transform: translate(-50%, -50%) rotate(-13deg); color: #5465bf65; }
.login-graphic .mark-accent { fill: #263cf4ba; }
.login-panel { display: grid; align-items: center; justify-items: center; padding: clamp(1.25rem, 5vw, 4rem); background: var(--surface); }
.login-form-wrap { width: min(100%, 23rem); }
.login-form-wrap h2 { font-size: 2rem; margin-bottom: 1.15rem; }
.login-mobile-brand { display: none; }
.demo-login { margin-top: 1.1rem; padding: .8rem; border-radius: .6rem; background: var(--blue-50); font-size: .9rem; }
.demo-login p { color: var(--muted); margin: .3rem 0 .55rem; }
.demo-login > div { display: flex; flex-wrap: wrap; gap: .45rem; }
.setup-note { margin-top: .8rem; font-size: .9rem; color: var(--muted); }
@media (max-width: 1120px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-inline: .65rem; }
  .stat { padding: .82rem; }
  .stat-label { font-size: .86rem; }
}
@media (max-width: 890px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(82vw, 15rem); transform: translateX(-105%); visibility: hidden; transition: transform .18s, visibility .18s; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-open .menu-scrim { display: block; position: fixed; z-index: 4; inset: 0; width: 100%; border: 0; background: #101a396a; }
  .topbar { min-height: 3.75rem; }
  .mobile-menu { display: inline-grid; }
  .topbar-left, .topbar-actions { gap: .4rem; }
  .topbar-left > span { display: none; }
  .topbar-left strong { font-size: .84rem; }
  .content { padding-top: 1.18rem; }
  .page-heading { align-items: start; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.1rem; }
  .page-heading p { font-size: .92rem; }
  .hero-mark { right: -3rem; top: 44%; opacity: .78; }
  .overview-hero .page-heading { flex-wrap: wrap; }
  .stats-grid { gap: .55rem; }
  .finance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 6.8rem; }
  .report-controls label:not(.visually-hidden) { flex-basis: calc(50% - .35rem); }
  .report-controls input { width: 100%; }
  .fields input, .fields select, .fields textarea { font-size: 1rem; }
  dialog.drawer { border-radius: 0; }
  .client-summary, .deal-title { flex-wrap: wrap; }
  .client-table, .client-table tbody { display: block; }
  .client-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .client-table tr { display: grid; gap: .45rem; padding: .78rem .9rem; border-top: 1px solid var(--line); }
  .client-table td, .client-table td:first-child, .client-table td:last-child { display: flex; align-items: center; justify-content: space-between; border: 0; gap: .55rem; padding: 0; }
  .client-table tr:hover td { background: transparent; }
  .client-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .client-table .client-cell { margin-bottom: .35rem; }
  .client-table .status-select { max-width: min(72%, 15.5rem); }
  .client-table .queue-action { justify-content: flex-end; margin-top: .18rem; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-mobile-brand { display: block; margin-bottom: 1.8rem; }
  .login-panel { padding-block: 2.1rem; align-items: start; min-height: 100dvh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

