/*! EventVerge by VergeKits — styles.css. Champagne calm: ivory, charcoal, VergeKits gold, muted plum. */
@font-face { font-family: 'InterEV'; src: url('fonts/Inter-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'InterEV'; src: url('fonts/Inter-Variable-ext.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F6F3EE; --surface: #FFFFFF; --raised: #EFEBE3; --hair: rgba(28,25,23,.09); --hair2: rgba(28,25,23,.16);
  --text: #1C1917; --text2: #57534E; --text3: #6F6A64; --charcoal: #1C1917; --charcoal2: #292524; --plum: #5B3A57; --plum-soft: rgba(91,58,87,.09);
  --gold: #C9973A; --gold-text: #8A6416; --gold-soft: rgba(201,151,58,.14); --gold-line: rgba(201,151,58,.55);
  --ok: #1FA67A; --ok-text: #0E6B4E; --ok-soft: rgba(31,166,122,.13);
  --warn: #E9A23B; --warn-text: #865407; --warn-soft: rgba(233,162,59,.17);
  --bad: #D9534F; --bad-text: #A82F2B; --bad-soft: rgba(217,83,79,.12);
  --neutral: #8B95A7; --neutral-text: #4C5566; --neutral-soft: rgba(139,149,167,.16);
  --info: #3B82C4; --info-text: #23649F; --info-soft: rgba(59,130,196,.12);
  --side-bg: #1C1917; --side-text: #E9E4DA; --side-text2: #A8A29E;
  --shadow-sm: 0 1px 2px rgba(28,25,23,.05), 0 2px 8px rgba(28,25,23,.04);
  --shadow: 0 2px 4px rgba(28,25,23,.04), 0 10px 30px -10px rgba(28,25,23,.14);
  --shadow-lg: 0 24px 60px -20px rgba(28,25,23,.35);
  --r1: 10px; --r2: 14px; --r3: 20px;
  --font: 'InterEV', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  --serif: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --t-press: 140ms; --t-panel: 240ms; --t-chart: 700ms; --ease: cubic-bezier(.2,.8,.2,1);
  --tabbar-h: 64px; --top-h: 64px; --side-w: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0C0F14; --surface: #141A22; --raised: #1C2430; --hair: rgba(243,241,236,.08); --hair2: rgba(243,241,236,.16);
  --text: #F3F1EC; --text2: #A8A29E; --text3: #9A948E; --plum: #C9A3C4; --plum-soft: rgba(201,163,196,.12);
  --gold-text: #E6B85C; --gold-soft: rgba(230,184,92,.14);
  --ok-text: #5FD3A8; --warn-text: #F2BE6B; --bad-text: #F08A86; --neutral-text: #B4BCCB; --info-text: #8DBDEB;
  --side-bg: #080A0E; --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 10px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-y: none; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-text); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 680; }
h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
p { margin: 0 0 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--text2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.gold { color: var(--gold-text); }
.plum { color: var(--plum); }
.okc { color: var(--ok-text); } .badc { color: var(--bad-text); } .warnc { color: var(--warn-text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[data-theme="dark"] :focus-visible { outline-color: #E6B85C; }
::selection { background: var(--gold-soft); }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; display: grid; place-items: center; background: #0d0c0b; z-index: 50; transition: opacity .3s; }
.splash img { width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,151,58,.6), 0 18px 50px -10px rgba(201,151,58,.45); }
.splash p { color: #E7C171; letter-spacing: .2em; font-size: 12px; text-transform: uppercase; text-align: center; margin-top: 16px; font-weight: 700; }
.splash.out { opacity: 0; pointer-events: none; }

/* ---------- shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--side-w) minmax(0,1fr); }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px 14px; overflow-y: auto; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; text-decoration: none; color: inherit; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(201,151,58,.6); flex: none; }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #E7C171; font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--side-text2); text-decoration: none; font-weight: 560; font-size: 14.5px; position: relative; transition: background var(--t-press), color var(--t-press); }
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--side-text); }
.nav a[aria-current="page"] { background: rgba(201,151,58,.13); color: #F3E3BE; }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; background: rgba(201,151,58,.22); color: #F3E3BE; border-radius: 99px; padding: 1px 8px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.07); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: var(--side-text2); line-height: 1.45; }
.side-foot b { color: var(--side-text); font-weight: 650; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 4; height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--hair); }
.top .title { font-size: 18px; font-weight: 720; min-width: 0; display: flex; align-items: center; gap: 10px; }
.top .title img { display: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--gold-line); }
.top .spacer { flex: 1; }
.search { position: relative; width: min(360px, 34vw); }
.search input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--hair2); background: var(--surface); padding: 0 14px 0 40px; outline: none; }
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search svg { position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; color: var(--text2); pointer-events: none; }
.search-results { position: absolute; top: 48px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--hair2); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; padding: 6px; z-index: 30; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; min-height: 44px; }
.search-results a:hover, .search-results a:focus { background: var(--raised); }
.search-results small { color: var(--text2); display: block; }
.view { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; }
.view:focus { outline: none; }

.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 28px; background: linear-gradient(90deg, var(--plum), #6E4A69); color: #F6EEF4; font-size: 14px; }
.banner b { font-weight: 700; }
.banner .btn { height: 36px; min-height: 36px; }
.banner .x { margin-left: auto; }

/* bottom tabs (phone): floating and solid; a backdrop strip stops content showing in the gaps */
.tabs-wrap { display: none; }
.fab { display: none; }

/* ---------- headings and page layout ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--text2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 6px; }
.grid { display: grid; gap: 16px; }
.cols-2 { display: grid; gap: 18px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.cols-main { display: grid; gap: 18px; grid-template-columns: minmax(0,1.65fr) minmax(300px,1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r2); box-shadow: var(--shadow-sm); padding: 20px; position: relative; min-width: 0; }
.card.pad0 { padding: 0; }
.card.tight { padding: 14px 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { display: flex; align-items: center; gap: 8px; }
.card-h h3 svg { width: 20px; height: 20px; color: var(--gold-text); }
.card.link { cursor: pointer; transition: transform var(--t-press) var(--ease), box-shadow var(--t-press); }
.card.link::after, .kpi.link::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t-panel) var(--ease); }
.card.link:hover::after, .card.link:focus-within::after, .kpi.link:hover::after, .kpi.link:focus-visible::after { transform: scaleX(1); }
.card.link:active { transform: scale(.995); }

/* ---------- KPI ---------- */
.m-only, .page-head .actions.m-only { display: none; }
@media (max-width: 899px) { .m-only, .page-head .actions.m-only { display: flex; } }
@media (min-width: 900px) { .kpis.k3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1100px) { .kpis.home { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r2); padding: 16px 18px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; display: block; min-width: 0; }
.kpi .lbl { font-size: 13px; color: var(--text2); font-weight: 560; display: flex; align-items: center; gap: 7px; }
.kpi .lbl svg { width: 17px; height: 17px; color: var(--gold-text); flex: none; }
.kpi .val { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.01em; margin-top: 6px; line-height: 1.15; white-space: nowrap; }
.kpi .note { font-size: 12.5px; color: var(--text2); margin-top: 4px; }
.kpi.hero { background: linear-gradient(145deg, #23201D, #1C1917 60%); color: #F3F1EC; border-color: rgba(201,151,58,.35); grid-column: span 2; overflow: hidden; }
.kpi.hero .lbl { color: #D9CFBF; } .kpi.hero .lbl svg { color: #E6B85C; } .kpi.hero .note { color: #BDB3A3; }
.kpi.hero .val { font-size: 40px; color: #F3E3BE; }
.kpi.hero::before { content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(201,151,58,.22), transparent); pointer-events: none; }

/* ---------- pipeline ---------- */
.pipe { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.pipe a { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; min-height: 64px; position: relative; overflow: hidden; }
.pipe a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--gold)); }
.pipe b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.pipe span { font-size: 12.5px; color: var(--text2); font-weight: 560; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--hair); min-height: 56px; text-decoration: none; color: inherit; border-radius: 0; }
.li:last-child { border-bottom: 0; }
a.li:hover, button.li:hover { background: linear-gradient(90deg, var(--raised), transparent); }
button.li { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; }
.li .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); flex: none; }
.li .ic.plum { background: var(--plum-soft); color: var(--plum); } .li .ic.bad { background: var(--bad-soft); color: var(--bad-text); } .li .ic.warn { background: var(--warn-soft); color: var(--warn-text); } .li .ic.ok { background: var(--ok-soft); color: var(--ok-text); }
.li .ic svg { width: 20px; height: 20px; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 640; overflow-wrap: anywhere; }
.li .t small { display: block; color: var(--text2); font-size: 13px; overflow-wrap: anywhere; }
.li .amt { text-align: right; font-weight: 680; white-space: nowrap; }
.li .amt small { display: block; font-weight: 500; color: var(--text2); font-size: 12px; }
.date-chip { width: 48px; flex: none; text-align: center; border-radius: 12px; background: var(--raised); padding: 5px 0; line-height: 1.05; }
.date-chip b { display: block; font-family: var(--serif); font-size: 20px; }
.date-chip small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); font-weight: 700; }

/* ---------- badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral-text); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); } .badge.warn { background: var(--warn-soft); color: var(--warn-text); } .badge.bad { background: var(--bad-soft); color: var(--bad-text); }
.badge.info { background: var(--info-soft); color: var(--info-text); } .badge.gold { background: var(--gold-soft); color: var(--gold-text); } .badge.plum { background: var(--plum-soft); color: var(--plum); }
.badge.plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 99px; background: var(--plum-soft); color: var(--plum); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--raised); color: var(--text); font-weight: 650; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease), background var(--t-press), box-shadow var(--t-press), border-color var(--t-press); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.975); }
.btn.primary { background: linear-gradient(135deg, #D9AC55, #C9973A 55%, #B98528); color: #1C1407; box-shadow: 0 8px 20px -10px rgba(201,151,58,.8); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.dark { background: var(--charcoal); color: #F3F1EC; }
.btn.dark .muted { color: inherit; opacity: .9; }
[data-theme="dark"] .btn.dark { background: #F3F1EC; color: #1C1917; }
.btn.ghost { background: transparent; border-color: var(--hair2); }
.btn.ghost:hover { background: var(--raised); }
.btn.danger { background: var(--bad-soft); color: var(--bad-text); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--text2); cursor: pointer; flex: none; text-decoration: none; transition: background var(--t-press), transform var(--t-press); }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.sm { width: 36px; height: 36px; }
.linkish { background: none; border: 0; color: var(--gold-text); font-weight: 650; cursor: pointer; padding: 10px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fields.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span, .lbl-s { font-size: 13px; font-weight: 620; color: var(--text2); }
.field small { color: var(--text3); font-size: 12px; }
.in, select.in, textarea.in { width: 100%; min-height: 44px; border-radius: 11px; border: 1px solid var(--hair2); background: var(--surface); padding: 9px 12px; outline: none; transition: border-color var(--t-press), box-shadow var(--t-press); }
textarea.in { min-height: 88px; resize: vertical; line-height: 1.45; }
.in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.in.bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.in.money, .in.num { text-align: right; font-variant-numeric: tabular-nums; }
select.in { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2357534E' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.in-wrap { position: relative; }
.in-wrap .pre, .in-wrap .suf { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; color: var(--text2); font-size: 14px; pointer-events: none; }
.in-wrap .pre { left: 12px; } .in-wrap .suf { right: 12px; }
.in-wrap .in.hp { padding-left: 30px; } .in-wrap .in.hs { padding-right: 34px; }
.err { color: var(--bad-text); font-size: 12.5px; font-weight: 600; }
.seg { display: inline-flex; background: var(--raised); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; background: transparent; border-radius: 9px; font-weight: 640; font-size: 13.5px; color: var(--text2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 560; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--hair2); transition: background var(--t-press); }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--t-press) var(--ease); }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r1); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); padding: 10px 10px; border-bottom: 1px solid var(--hair2); white-space: nowrap; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r, .tbl th.r { text-align: right; }
.tbl tfoot td { font-weight: 750; border-top: 1px solid var(--hair2); border-bottom: 0; }
.tbl tr.over td { background: var(--warn-soft); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--raised); }
.tbl .in { min-height: 40px; padding: 7px 10px; }
.tbl.budget td:first-child { min-width: 190px; } .tbl.budget .in-wrap { min-width: 118px; } .tbl.budget input[type=date] { min-width: 150px; } .tbl.budget select.in { min-width: 150px; }
.tbl.fees td:first-child { min-width: 200px; } .tbl.fees .in.num { min-width: 80px; } .tbl.fees .in-wrap { min-width: 120px; }
@media (max-width: 899px) { .tbl.fees td:first-child, .tbl.fees .in.num, .tbl.fees .in-wrap { min-width: 0; } }
.budget-sum { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 24px; align-items: center; }
@media (max-width: 899px) { .tbl.fees td:first-child { min-width: 200px; } .tbl.fees .in.num { min-width: 80px; } .tbl.fees .in-wrap { min-width: 120px; }
@media (max-width: 899px) { .tbl.fees td:first-child, .tbl.fees .in.num, .tbl.fees .in-wrap { min-width: 0; } }
.budget-sum { grid-template-columns: minmax(0,1fr); } .tbl.budget td:first-child { min-width: 0; } .tbl.budget .in-wrap, .tbl.budget input[type=date], .tbl.budget select.in { min-width: 0; } }

/* ---------- sub tabs ---------- */
.subtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--raised); border-radius: 14px; margin-bottom: 18px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 11px; text-decoration: none; color: var(--text2); font-weight: 640; font-size: 14px; white-space: nowrap; flex: none; }
.subtabs a svg { width: 17px; height: 17px; }
.subtabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- event header ---------- */
.ev-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; background: linear-gradient(135deg, var(--surface), var(--surface) 60%, var(--gold-soft)); }
.ev-head h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; color: var(--text2); font-size: 14px; }
.ev-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ev-meta svg { width: 16px; height: 16px; color: var(--gold-text); }
.countdown { text-align: center; min-width: 108px; padding: 10px 14px; border-radius: 16px; background: var(--charcoal); color: #F3E3BE; }
.countdown b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1; }
.countdown small { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #CDBFA6; }

/* ---------- proposal builder ---------- */
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 40px minmax(0,1fr) 44px; grid-template-areas: "ic desc del" "ic nums nums"; gap: 8px 12px; align-items: center; padding: 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--surface); }
.line .ic { grid-area: ic; align-self: start; } .line .desc-cell { grid-area: desc; } .line .del-cell { grid-area: del; }
.line .nums { grid-area: nums; display: grid; grid-template-columns: 96px minmax(0,170px) minmax(0,170px) minmax(110px,1fr); gap: 10px; align-items: end; }
.mini > span { display: block !important; }
.line-head { display: none !important; }
.line .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); }
.line .ic svg { width: 19px; height: 19px; }
.mini > span { display: none; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.mini { min-width: 0; }
.line .amount { text-align: right; font-weight: 720; }
.line .amount small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text2); }
.totals { display: flex; flex-direction: column; gap: 2px; }
.totals .tr { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14.5px; }
.totals .tr.grand { border-top: 1px solid var(--hair2); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 760; }
.totals .tr.grand .num { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.sticky-col { position: sticky; top: calc(var(--top-h) + 16px); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- progress ring and bars ---------- */
.ring-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring-wrap .kv { min-width: 170px; }
.sched-row { display: grid; grid-template-columns: minmax(0,1fr) 92px 104px 36px; gap: 8px; align-items: center; }
@media (max-width: 380px) { .sched-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 36px; } .sched-row > input:first-child { grid-column: 1 / -1; } }
.ring { width: 120px; height: 120px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-family: var(--serif); font-size: 24px; }
.ring .lbl small { display: block; font-size: 11px; color: var(--text2); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--raised); }
.ring .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset var(--t-chart) var(--ease); }
.ring .fg.over { stroke: var(--warn); }
.bar { height: 8px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--gold); transform-origin: left; animation: barIn var(--t-chart) var(--ease) both; }
.bar > i.over { background: var(--warn); } .bar > i.ok { background: var(--ok); }
@keyframes barIn { from { transform: scaleX(0); } }

/* ---------- charts ---------- */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; }
.chart .axis { stroke: var(--hair2); }
.chart .grid-l { stroke: var(--hair); }
.chart text { fill: var(--text2); font-size: 11px; font-family: var(--font); }
.chart .bar-r { transform-box: fill-box; transform-origin: bottom; animation: growY var(--t-chart) var(--ease) both; }
.chart .bar-h { transform-box: fill-box; transform-origin: left; animation: growX var(--t-chart) var(--ease) both; }
@keyframes growY { from { transform: scaleY(0); } } @keyframes growX { from { transform: scaleX(0); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.pat { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 2px, transparent 2px 5px); }
.chart-toggle { font-size: 13px; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 34px 18px; color: var(--text2); }
.empty svg.art { width: 120px; height: 96px; margin: 0 auto 12px; display: block; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto 14px; }

/* ---------- sheet (dialog) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(12,10,8,.46); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn var(--t-panel) var(--ease); }
.sheet { width: min(620px, 100%); max-height: min(88vh, 900px); overflow: auto; background: var(--surface); border-radius: var(--r3); box-shadow: var(--shadow-lg); padding: 22px; animation: popIn var(--t-panel) var(--ease); overscroll-behavior: contain; }
.sheet.wide { width: min(880px, 100%); }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-f { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.actions-list { display: flex; flex-direction: column; gap: 6px; }
.actions-list button { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface); text-align: left; font-weight: 650; cursor: pointer; }
.actions-list button:hover { background: var(--raised); }
.actions-list .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); }
.actions-list .ic svg { width: 20px; height: 20px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 80; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; max-width: min(420px, calc(100vw - 48px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: #1C1917; color: #F3F1EC; padding: 10px 10px 10px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: popIn var(--t-panel) var(--ease); min-height: 48px; }
[data-theme="dark"] .toast { background: #F3F1EC; color: #1C1917; }
.toast .tbtn { background: rgba(201,151,58,.22); color: #F3E3BE; border: 0; border-radius: 10px; min-height: 36px; padding: 0 12px; font-weight: 700; cursor: pointer; }
[data-theme="dark"] .toast .tbtn { color: #6B4C0F; }
.saved-tick { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok-text); font-weight: 650; opacity: 0; transition: opacity .3s; }
.saved-tick.on { opacity: 1; }
.saved-tick svg { width: 15px; height: 15px; }

/* ---------- now / next ---------- */
.nn { display: grid; gap: 14px; grid-template-columns: 1.2fr 1fr; }
.nn .now { background: linear-gradient(150deg, #24201C, #1C1917); color: #F3F1EC; border-color: rgba(201,151,58,.4); }
.nn .now .eyebrow { color: #E6B85C; }
.nn .big { font-family: var(--serif); font-size: 34px; line-height: 1.15; margin: 4px 0 8px; }
.nn .clock { font-family: var(--serif); font-size: 52px; line-height: 1; color: #F3E3BE; }
.ros { display: flex; flex-direction: column; gap: 6px; }
.ros-item { display: grid; grid-template-columns: 30px 88px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 10px; border: 1px solid var(--hair); border-radius: 12px; background: var(--surface); }
.ros-item.now { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.ros-item.past { opacity: .62; }
.ros-item .time { font-family: var(--serif); font-size: 17px; font-weight: 600; white-space: nowrap; }
.ros-item .t b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.ros-item .t small { color: var(--text2); display: block; overflow-wrap: anywhere; }
.drag { width: 30px; height: 44px; display: grid; place-items: center; color: var(--text3); cursor: grab; border: 0; background: none; touch-action: none; border-radius: 8px; }
.drag svg { width: 18px; height: 18px; }
.ros-item.dragging { box-shadow: var(--shadow-lg); border-color: var(--gold); position: relative; z-index: 5; }

/* ---------- seating ---------- */
.tables-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.table-card { border: 1px solid var(--hair); border-radius: 14px; padding: 12px; background: var(--surface); text-align: center; }
.table-card .disc { width: 74px; height: 74px; margin: 2px auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 2px solid var(--gold-line); font-family: var(--serif); font-size: 20px; }
.table-card.over .disc { border-color: var(--warn); background: var(--warn-soft); }
.table-card b { display: block; font-size: 14px; }

/* ---------- welcome, onboarding ---------- */
.welcome { min-height: calc(100dvh - 120px); display: grid; place-items: center; }
.welcome .card { max-width: 560px; width: 100%; padding: 32px 28px; text-align: center; }
.welcome img.logo { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold-line), 0 14px 40px -12px rgba(201,151,58,.6); }
.welcome h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; margin: 14px 0 6px; }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.steps i { width: 28px; height: 4px; border-radius: 4px; background: var(--hair2); }
.steps i.on { background: var(--gold); }
.choice { display: grid; gap: 10px; text-align: left; margin-top: 18px; }
.privacy { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--text2); font-size: 13px; margin-top: 16px; }
.privacy svg { width: 16px; height: 16px; color: var(--ok-text); }

/* ---------- photos ---------- */
.photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--raised); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 12.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.photo .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.45); color: #fff; }

/* ---------- self-check ---------- */
.check-row { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--hair); }
.check-row:last-child { border-bottom: 0; }
.check-row b { display: block; }
.check-row small { color: var(--text2); }
.overall { display: flex; align-items: center; gap: 14px; }
.overall .dot { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok-text); }
.overall .dot.warn { background: var(--warn-soft); color: var(--warn-text); }
.overall .dot svg { width: 28px; height: 28px; }

/* ---------- storage meter, misc ---------- */
.meter { height: 10px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--text2); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.divider { height: 1px; background: var(--hair); margin: 16px 0; }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--raised); color: var(--text2); font-size: 13.5px; line-height: 1.5; }
.note-box b { color: var(--text); }
.warn-box { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-text); font-size: 13.5px; font-weight: 560; display: flex; gap: 10px; align-items: flex-start; }
.warn-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.disclaimer { font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.flag { display: inline-flex; align-items: center; gap: 4px; color: var(--warn-text); font-weight: 700; font-size: 12.5px; }
.flag svg { width: 14px; height: 14px; }
.vs { display: grid; grid-template-columns: minmax(0,1.4fr) 1fr 1fr; gap: 0; font-size: 14px; }
.vs > div { padding: 9px 10px; border-bottom: 1px solid var(--hair); }
.vs > div:nth-child(3n+2), .vs > div:nth-child(3n) { text-align: right; font-variant-numeric: tabular-nums; }
.vs .h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); }
.vs .tot { font-weight: 760; border-bottom: 0; }
.vs .flagged { background: var(--warn-soft); }

/* ---------- documents (print view) ---------- */
.doc-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.doc-stage { background: var(--raised); border-radius: var(--r2); padding: 28px; overflow-x: auto; }
.doc { color: #1C1917; background: #fff; width: 100%; max-width: 816px; margin: 0 auto; padding: 56px 60px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.5; border-radius: 4px; color-scheme: light; }
.doc.a4 { max-width: 794px; }
.doc .dh { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 20px; border-bottom: 2px solid #C9973A; margin-bottom: 22px; }
.doc .dh .biz b { font-size: 17px; display: block; }
.doc .dh .biz { color: #57534E; font-size: 12.5px; }
.doc .dh img { max-height: 64px; max-width: 160px; display: block; margin-bottom: 8px; border-radius: 6px; }
.doc .dt { text-align: right; }
.doc .dt h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; color: #1C1917; letter-spacing: .02em; }
.doc .dt .meta { color: #57534E; font-size: 12.5px; margin-top: 6px; }
.doc .to { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.doc .to h4 { color: #8A6416; font-size: 11px; margin-bottom: 4px; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.doc th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #57534E; border-bottom: 1px solid #1C1917; padding: 6px 6px; }
.doc td { padding: 7px 6px; border-bottom: 1px solid #E7E2D8; vertical-align: top; }
.doc .r { text-align: right; white-space: nowrap; }
.doc .sum { margin-left: auto; width: 300px; }
.doc .sum div { display: flex; justify-content: space-between; padding: 5px 6px; }
.doc .sum .g { border-top: 2px solid #1C1917; font-weight: 800; font-size: 15px; margin-top: 4px; padding-top: 8px; }
.doc .sec { margin-top: 18px; page-break-inside: avoid; break-inside: avoid; }
.doc .sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #5B3A57; margin-bottom: 6px; }
.doc .foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid #E7E2D8; color: #6F6A64; font-size: 11px; }
.doc .pill { display: inline-block; padding: 1px 8px; border-radius: 99px; border: 1px solid #C9973A; color: #8A6416; font-size: 11px; font-weight: 700; }
.doc tr.overrow td { background: #FDF3E1; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols-main { grid-template-columns: minmax(0,1fr); }
  .sticky-col { position: static; }
  .pipe { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 899px) {
  :root { --top-h: 58px; }
  .app { display: block; }
  .side { display: none; }
  .top { padding: 0 max(12px, var(--safe-l)) 0 max(14px, var(--safe-l)); padding-top: var(--safe-t); height: calc(var(--top-h) + var(--safe-t)); gap: 8px; }
  .top .title img { display: block; }
  .top .title { font-size: 17px; }
  .top .title span { overflow-wrap: anywhere; line-height: 1.15; }
  .top .new-btn { display: none; }
  .search { display: none; width: auto; }
  .search.open { display: block; position: fixed; left: 10px; right: 10px; top: calc(var(--safe-t) + 8px); z-index: 40; }
  .view { padding: 18px max(14px, var(--safe-l)) calc(var(--tabbar-h) + 120px + var(--safe-b)) max(14px, var(--safe-r)); }
  .banner { padding: 10px 14px; }
  .cols-2 { grid-template-columns: minmax(0,1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .val { font-size: 22px; }
  .kpi.hero .val { font-size: 34px; }
  .pipe { display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .pipe::-webkit-scrollbar { display: none; }
  .pipe a { flex: 0 0 auto; min-width: 104px; }
  .ev-head { grid-template-columns: minmax(0,1fr); }
  .ev-head h1 { font-size: 25px; }
  .countdown { justify-self: start; display: flex; gap: 8px; align-items: baseline; min-width: 0; padding: 8px 14px; }
  .countdown b { font-size: 24px; }
  .nn { grid-template-columns: minmax(0,1fr); }
  .nn .clock { font-size: 40px; }
  .doc-stage { padding: 10px; }
  .doc { padding: 28px 20px; }
  .doc .to { grid-template-columns: 1fr; }
  .doc .sum { width: 100%; }
  .page-head h1 { font-size: 24px; }
  .toasts { left: 14px; right: 84px; bottom: calc(var(--tabbar-h) + 28px + var(--safe-b)); align-items: stretch; max-width: none; }
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); animation: sheetUp var(--t-panel) var(--ease); }
  .sheet.wide { width: 100%; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
  .tabs-wrap { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bg); padding: 6px max(10px, var(--safe-l)) calc(8px + var(--safe-b)) max(10px, var(--safe-r)); border-top: 1px solid var(--hair); transform: translateZ(0); }
  .tabs { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); height: var(--tabbar-h); background: var(--surface); border: 1px solid var(--hair2); border-radius: 20px; box-shadow: 0 8px 24px -10px rgba(28,25,23,.3); padding: 0 4px; }
  [data-theme="dark"] .tabs { background: var(--raised); }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text2); font-size: 11px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; border-radius: 14px; min-width: 0; position: relative; }
  .tabs a svg { width: 23px; height: 23px; }
  .tabs a[aria-current="page"] { color: var(--gold-text); }
  .tabs a[aria-current="page"]::after { content: ''; position: absolute; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
  .fab { display: grid; place-items: center; position: fixed; z-index: 21; right: max(16px, var(--safe-r)); bottom: calc(var(--tabbar-h) + 26px + var(--safe-b)); width: 58px; height: 58px; border-radius: 19px; border: 0; background: linear-gradient(135deg, #D9AC55, #C9973A 55%, #B98528); color: #1C1407; box-shadow: 0 14px 30px -10px rgba(201,151,58,.9), 0 2px 6px rgba(28,25,23,.2); cursor: pointer; transition: transform var(--t-press) var(--ease); }
  .fab:active { transform: scale(.94); }
  .fab svg { width: 26px; height: 26px; }
  .line, .line.resale { grid-template-columns: 40px minmax(0,1fr) 44px; grid-template-areas: "ic desc del" "nums nums nums"; row-gap: 8px; }
  .line .in { padding-left: 10px; padding-right: 10px; }
  .card { padding: 16px; }
  .line { padding: 8px; }
  .line .in-wrap .in.hp { padding-left: 24px; }
  .line .ic { grid-area: ic; align-self: start; }
  .line .desc-cell { grid-area: desc; }
  .line .del-cell { grid-area: del; }
  .line .nums { grid-template-columns: 58px minmax(0,.85fr) minmax(0,1.25fr); gap: 8px; }
  .line .nums .amount { grid-column: 1 / -1; padding-top: 2px; }
  .line-head { display: none; }
  .tbl.stack-sm thead { display: none; }
  .tbl.stack-sm tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .tbl.stack-sm td { border: 0; padding: 3px 2px; }
  .tbl.stack-sm td::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }
  .tbl.stack-sm td.first { grid-column: 1 / -1; font-weight: 700; }
  .tbl.stack-sm td.first::before { display: none; }
  .tbl.stack-sm .r { text-align: left; }
  .tbl.stack-sm tfoot tr { display: grid; }
  .fields.two { grid-template-columns: minmax(0,1fr); }
  .ros-item { grid-template-columns: 30px 78px minmax(0,1fr); }
  .ros-item .time { font-size: 15px; }
  .ros-item .acts { grid-column: 2 / -1; display: flex; gap: 4px; justify-content: flex-end; }
  .vs { font-size: 13px; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: minmax(0,1fr); }
  .kpi.hero { grid-column: auto; }
  .tabs a { font-size: 10.5px; }
  .tabs a svg { width: 22px; height: 22px; }
  .page-head .actions .btn { padding: 0 12px; }
  .ev-head h1 { font-size: 22px; }
}
@media (min-width: 1700px) { .view { max-width: 1520px; } :root { --side-w: 268px; } }
@media (min-width: 2200px) { body { font-size: 16px; } .view { max-width: 1680px; } }

/* ---------- motion preferences and screenshot mode ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.shot *, .shot *::before, .shot *::after { animation: none !important; transition: none !important; }
.shot .toasts, .shot .banner.demo { display: none !important; }

/* ---------- print ---------- */
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --text: #1C1917; color-scheme: light; }
  html, body { background: #fff !important; }
  .side, .top, .tabs-wrap, .fab, .banner, .toasts, .doc-bar, .no-print, .sheet-bg { display: none !important; }
  .app { display: block; }
  .view { padding: 0 !important; max-width: none; }
  .doc-stage { background: none; padding: 0; }
  .doc { box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .doc tr, .doc .sec { page-break-inside: avoid; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
