/* Boncho Фактури — web app. Solid colours only (no transparency, shadows excepted). */
@font-face { font-family: M; font-weight: 400; font-display: swap; src: url(/app/fonts/Montserrat-Regular.ttf) format('truetype'); }
@font-face { font-family: M; font-weight: 500; font-display: swap; src: url(/app/fonts/Montserrat-Medium.ttf) format('truetype'); }
@font-face { font-family: M; font-weight: 600; font-display: swap; src: url(/app/fonts/Montserrat-SemiBold.ttf) format('truetype'); }
@font-face { font-family: M; font-weight: 700; font-display: swap; src: url(/app/fonts/Montserrat-Bold.ttf) format('truetype'); }
:root {
  /* Boncho brand v1 (21.11.2026): Ink / Graphite / Paper / Mist / Steel / Slate; red only for overdue and errors. */
  --ink: #0A0A0B; --ink2: #1F2226; --muted: #5B6168; --faint: #8A9099; --line: #D6DADF; --line2: #E6E9EC;
  --bg: #FFFFFF; --panel: #F1F3F5; --hover: #E6E9EC; --rail: #1F2226; --rail2: #2A2E33;
  --inv: #0A0A0B; --inv-bg: #F1F3F5; --rec: #1F2226; --rec-bg: #F1F3F5;
  --red: #E5484D; --red-bg: #FDECEC; --blue: #0A0A0B; --blue-bg: #F1F3F5; --amber: #5B6168; --amber-bg: #F1F3F5;
  --r: 12px; --r2: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: M, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 30px; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
.boot { display: grid; place-items: center; height: 100vh; font-weight: 700; color: var(--faint); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; } .b { font-weight: 600; } .bb { font-weight: 700; }
.green { color: var(--inv); } .red { color: var(--red); } .blue { color: var(--blue); } .amber { color: var(--amber); }
.row { display: flex; gap: 12px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; } .gap8 { gap: 8px; } .mt0 { margin-top: 0 !important; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hide { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; color: var(--ink); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
.btn.green { background: var(--inv); border-color: var(--inv); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 1; background: var(--line2); color: var(--faint); border-color: var(--line2); cursor: default; }
.btn .kbd { background: var(--rail2); color: #CFCFCF; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: auto; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink); }
.iconbtn:hover { background: var(--hover); }
.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-weight: 500; }
.link.green { color: var(--inv); font-weight: 600; }

/* Forms */
label.f { display: block; }
label.f > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
label.f > span b { color: var(--ink); font-weight: 600; font-size: 13px; }
.in, select.in, textarea.in { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; background: #fff; outline: none; }
select.in { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat; text-overflow: ellipsis; }
select.in:disabled, .in:disabled { background-color: var(--panel); color: var(--muted); }
textarea.in { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.in:focus { border-color: var(--ink); box-shadow: 0 0 0 3px #E8EBEE; }
.in[readonly] { background: var(--panel); color: var(--muted); }
.in.err { border-color: var(--red); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--inv); }
.toggle { position: relative; width: 40px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle i { position: absolute; inset: 0; background: #D8D8D8; border-radius: 22px; cursor: pointer; transition: background .15s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + i { background: var(--inv); }
.toggle input:checked + i::after { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Auth screens */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth header { padding: 24px 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); }
.logo i { width: 22px; height: 22px; background: var(--ink); border-radius: 6px; display: inline-block; }
.auth main { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.card-auth { width: 100%; max-width: 420px; background: var(--panel); border-radius: 16px; padding: 32px; }
.card-auth h1 { font-size: 24px; margin-bottom: 8px; }
.card-auth .lead { color: var(--muted); margin: 0 0 22px; }
.step { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.codebox { display: flex; gap: 8px; margin: 4px 0 18px; }
.codebox input { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 600; border: 1px solid var(--line); border-radius: var(--r); background: #fff; outline: none; }
.codebox input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px #E8EBEE; }
.auth footer { text-align: center; padding: 20px; font-size: 12px; color: var(--faint); }
.auth footer a { color: var(--faint); }
.found { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 14px 0; }
.found .t { font-size: 12px; color: var(--muted); }
.found .n { font-weight: 700; margin: 4px 0 2px; }
/* A6-d onboarding: ЕИК first, then IBAN (greyed until the company is found) */
.onb .lead { margin-bottom: 18px; }
.onb .stack > * + * { margin-top: 16px; }
.onb label.f > span:first-child { font-size: 13px; font-weight: 600; color: var(--ink2); }
.onb label.f > span.lbl2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.onb .lbl2 small { font-size: 12px; font-weight: 400; color: var(--faint); }
.onb label.f > span.inwrap { position: relative; display: block; margin: 0; font-size: inherit; color: inherit; }
.onb .in { height: 44px; font-size: 15px; padding: 0 14px; }
.onb .inwrap .in { padding-right: 38px; }
.onb .inwrap .ok { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--inv); pointer-events: none; }
.onb label.f > span.hint { display: block; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.onb label.f > span.hint.ok { color: var(--inv); font-weight: 600; }
.onb label.f > span.hint.red { color: var(--red); }
.onb label.f > span.foundline { display: flex; justify-content: space-between; gap: 10px; color: var(--inv); font-weight: 600; }
.onb .foundline span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb .foundline .link { font-size: 12px; color: var(--rec); flex: none; }
.onb label.f > span.note { display: block; margin: 8px 0 0; font-size: 12px; }
.onb #ibanf.off > span:first-child, .onb #ibanf.off > span:first-child small { color: #B5B5B5; }
.onb #ibanf.off .in { background: #F1F2F4; border-color: #E6E7EA; color: #B5B5B5; }
.onb #ibanf.off .in::placeholder { color: #C4C4C4; }
.onb .acts-auth { display: grid; gap: 8px; padding-top: 4px; }
.btn.lg { height: 46px; font-size: 15px; }
.btn.outline { background: #fff; border-color: #E1E5E9; color: var(--ink2); font-weight: 500; }
.btn.outline:hover { background: var(--hover); }
.btn.primary:disabled { background: #E4E5E8; border-color: #E4E5E8; color: #A3A3A3; }
.btn.outline:disabled { background: #fff; border-color: #ECECEC; color: #B5B5B5; }
.mt8 { margin-top: 8px; }
.btn.cashon { background: var(--inv-bg); border-color: var(--inv); color: var(--inv); }
.btn.ghost.muted { color: var(--muted); }
.note { background: #fff; border-radius: var(--r); padding: 12px 14px; font-size: 13px; color: var(--muted); }
.note.amber { background: var(--amber-bg); color: #6E5300; }
.note.red { background: var(--red-bg); color: var(--red); }
.note.green { background: var(--inv-bg); color: #1F6A4F; }
.note.blue { background: var(--blue-bg); color: #1D4F96; }

/* App shell */
.shell { display: grid; grid-template-columns: 70px 220px 1fr; min-height: 100vh; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 6px; position: sticky; top: 0; height: 100vh; }
.rail .org { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 18px; cursor: pointer; border: 0; }
.rail a.m { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #BDBDBD; font-size: 11px; text-decoration: none; padding: 6px 0; width: 100%; }
.rail a.m b { width: 36px; height: 36px; border-radius: 9px; background: var(--rail2); display: grid; place-items: center; color: #D0D0D0; }
.rail a.m.on { color: #fff; } .rail a.m.on b { background: var(--inv); color: #fff; }
.rail a.m.rec.on b { background: var(--rec); }
.rail .sp { flex: 1; }
.rail .me { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 600; border: 0; cursor: pointer; margin-top: 10px; }
.side { background: var(--panel); border-right: 1px solid var(--line2); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.modcard { display: flex; gap: 10px; align-items: center; background: var(--inv-bg); border-radius: 12px; padding: 10px; margin-bottom: 14px; }
.modcard b { width: 32px; height: 32px; border-radius: 8px; background: var(--inv); color: #fff; display: grid; place-items: center; flex: none; }
.modcard div { font-size: 12px; line-height: 1.3; min-width: 0; }
.modcard small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .new { width: 100%; justify-content: flex-start; margin-bottom: 16px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink2); text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: var(--hover); }
.nav a.on { background: #fff; font-weight: 600; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.nav a .c { margin-left: auto; font-size: 11px; background: var(--line2); color: var(--muted); padding: 1px 7px; border-radius: 10px; }
.nav a.on .c { background: var(--inv); color: #fff; }
.nav .sec { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin: 16px 10px 6px; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.nav .sec.inv::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--inv); }
.side h2 { padding: 0 10px; margin: 4px 0 12px; font-size: 18px; }
.main { min-width: 0; padding: 22px 32px 60px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs .mod { color: var(--inv); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.crumbs .mod::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--inv); }
.crumbs .sep { color: var(--faint); }
.head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.head .t { flex: 1; min-width: 0; }
.head .sub { color: var(--muted); margin-top: 4px; }
.head .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--line2); color: var(--muted); vertical-align: middle; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-draft { color: var(--muted); } .st-issued { color: var(--inv); } .st-sent { color: var(--blue); } .st-paid { color: var(--inv); } .st-overdue { color: var(--red); } .st-cancelled { color: var(--faint); } .st-opened { color: var(--amber); }

.box { border: 1px solid var(--line); border-radius: var(--r2); background: #fff; padding: 18px 20px; }
.box + .box { margin-top: 16px; }
.box.flush { padding: 0; overflow: hidden; }
.stats { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.stat .l { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* Tables */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 13px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover td { background: #FAFAFB; }
table.t tbody tr.sel td { background: var(--panel); }
table.t tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
table.t .r { text-align: right; }
.split { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; background: #fff; position: sticky; top: 20px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { font-weight: 600; text-align: right; }
.big { white-space: nowrap; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.empty { text-align: center; padding: 70px 20px; }
.empty .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--inv-bg); color: var(--inv); display: grid; place-items: center; margin: 0 auto 18px; }
.empty h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 20px; }
.todo { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.todo a { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 200px; text-align: left; color: var(--ink); text-decoration: none; }
.todo a:hover { background: var(--panel); }
.todo a b { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.todo a b::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #CFCFCF; flex: none; }
.todo a.done b::before { background: var(--inv) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--inv); }
.todo a small { color: var(--muted); display: block; margin: 4px 0 0 24px; font-size: 12px; }

/* Editor */
.ed { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.clientcard { display: flex; gap: 12px; align-items: flex-start; }
.av { width: 38px; height: 38px; border-radius: 9px; background: var(--panel); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.picker { position: relative; }
.drop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.10); padding: 6px; max-height: 340px; overflow-y: auto; }
.drop .h { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px 4px; }
.drop .o { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.drop .o:hover, .drop .o.on { background: var(--panel); }
.drop .o small { display: block; color: var(--muted); font-size: 12px; }
.drop .foot { border-top: 1px solid var(--line2); margin-top: 4px; padding: 8px 10px 4px; }
table.lines { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.lines th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.lines td { padding: 6px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.lines .in { height: 38px; padding: 0 10px; }
table.lines .c-q { width: 62px; } table.lines .c-u { width: 80px; } table.lines .c-p { width: 100px; } table.lines .c-v { width: 78px; } table.lines .c-d { width: 58px; } table.lines .c-s { width: 96px; text-align: right; font-weight: 600; white-space: nowrap; } table.lines .c-x { width: 40px; }
table.lines input.r { text-align: right; }
.sum .kv { border: 0; padding: 5px 0; }
.sum .tot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.sum .tot span:last-child { font-size: 20px; white-space: nowrap; }
.sum .tot span:first-child { padding-right: 10px; }

/* Document preview (mirrors the PDF) */
.prevwrap { background: var(--panel); border-radius: var(--r2); padding: 28px; }
.paper { background: #fff; max-width: 640px; margin: 0 auto; border-top: 5px solid var(--acc, var(--inv)); box-shadow: 0 6px 24px rgba(0,0,0,.08); padding: 28px 30px 26px; font-size: 11.5px; color: var(--ink); }
.paper .ph { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.paper .lg { display: flex; gap: 10px; align-items: center; }
.paper .lg b { width: 32px; height: 32px; border-radius: 7px; background: var(--acc, var(--inv)); color: #fff; display: grid; place-items: center; font-size: 11px; }
.paper .lg img { max-height: 36px; max-width: 140px; }
.paper .ti { text-align: right; } .paper .ti div:first-child { font-weight: 700; font-size: 17px; }
.paper .pp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.paper .lab { color: var(--acc, var(--inv)); font-weight: 600; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.paper .dt { color: var(--muted); padding: 12px 0; display: flex; gap: 22px; flex-wrap: wrap; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { color: var(--acc, var(--inv)); font-weight: 600; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--acc, var(--inv)); font-size: 10.5px; }
.paper td { padding: 7px 4px; border-bottom: 1px solid var(--line2); }
.paper .r { text-align: right; }
.paper .tt { margin-left: auto; width: 260px; margin-top: 10px; }
.paper .tt .kv { padding: 3px 0; border: 0; font-size: 11px; }
.paper .due { display: flex; justify-content: space-between; align-items: center; background: var(--acc-bg, var(--inv-bg)); border-radius: 6px; padding: 9px 12px; margin-top: 6px; font-weight: 600; }
.paper .due b { color: var(--acc, var(--inv)); font-size: 16px; }
.paper .words { text-align: right; color: var(--muted); margin-top: 8px; font-size: 10.5px; }
.paper .pf { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; color: var(--muted); }
.paper .wm { color: var(--faint); text-align: center; font-size: 10px; margin-top: 18px; }

.timeline { font-size: 13px; }
.timeline div { display: flex; gap: 10px; padding: 6px 0; }
.timeline div::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #CFCFCF; margin-top: 6px; flex: none; }
.timeline time { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* Reports */
.bars { display: flex; gap: 10px; align-items: flex-end; height: 180px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bars i { display: block; width: 100%; max-width: 46px; background: var(--inv); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars div.neg i { background: var(--red); }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; background: #EDEEF0; display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 24px; }
.modal h2 { font-size: 20px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: 90vw; }
.toast.err { background: var(--red); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.setrow { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.setrow:last-child { border-bottom: 0; }
.setrow .l { flex: 1; min-width: 0; } .setrow .l b { display: block; font-weight: 600; } .setrow .l small { color: var(--muted); font-size: 12px; }
.setrow .c { width: 260px; flex: none; }
.mobilebar, .mtop { display: none; }

@media (max-width: 1180px) {
  .split, .ed { grid-template-columns: 1fr; }
  .panel { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail, .side { display: none; }
  .side.open { display: block; position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .main { padding: 14px 16px 90px; }
  .mtop { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: #fff; z-index: 20; }
  .mobilebar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--rail); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobilebar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #BDBDBD; font-size: 10.5px; text-decoration: none; padding: 4px 0; }
  .mobilebar a.on { color: #fff; } .mobilebar a.on .icon { color: #7FD3B0; }
  h1 { font-size: 24px; }
  .head { flex-wrap: wrap; }
  .head .acts { width: 100%; justify-content: flex-start; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .card-auth { padding: 24px 20px; }
  .auth header { padding: 16px 20px; }
  .auth main { place-items: start center; padding: 8px 20px 24px; }
  .card-auth.onb { background: transparent; padding: 0; }
  .card-auth.onb h1 { font-size: 22px; }
  table.t.cards thead { display: none; }
  table.t.cards tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
  table.t.cards td { border: 0; padding: 2px 0; }
  table.t.cards td.hm { display: none; }
  table.lines thead { display: none; }
  table.lines { table-layout: auto; }
  table.lines tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.lines td { border: 0; padding: 0; width: auto !important; }
  table.lines td.c-n { grid-column: 1 / 3; grid-row: 1; }
  table.lines td.c-x { grid-column: 3; grid-row: 1; justify-self: end; }
  table.lines td.c-s { text-align: left; align-self: center; }
  .setrow { flex-direction: column; align-items: stretch; gap: 8px; } .setrow .c { width: 100%; }
  .prevwrap { padding: 10px; } .paper { padding: 18px 16px; }
  .paper .pp { grid-template-columns: 1fr; }
  .stats { gap: 18px; }
}

/* Import (F0-b/c/d) */
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.imp-h { font-size: 15px; margin: 0 0 12px; }
.imp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.imp-tile { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; font: inherit; color: var(--ink); }
.imp-tile span { flex: 1; min-width: 0; } .imp-tile b { display: block; font-size: 14px; } .imp-tile small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.imp-tile i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #C4C4C4; flex: none; }
.imp-tile.on { border: 1.5px solid var(--ink); } .imp-tile.on i { border: 5px solid var(--ink); }
.imp-what { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.imp-what input { width: 18px; height: 18px; accent-color: var(--ink); margin-top: 1px; flex: none; }
.imp-what b { display: block; font-size: 14px; } .imp-what small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed #C4C4C4; border-radius: 10px; background: #fff; cursor: pointer; text-align: center; }
.imp-drop .icon { width: 20px; height: 20px; color: var(--muted); } .imp-drop small { color: var(--muted); font-size: 12px; }
.imp-drop.over { border-color: var(--ink); background: var(--panel); }
.imp-file { background: #fff; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 6px 6px 12px; }
.imp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.imp-stat { padding: 16px 18px; } .imp-stat .v { font-size: 26px; font-weight: 700; } .imp-stat .v.green { color: var(--inv); } .imp-stat .v.amber { color: #B28500; }
.imp-stat b { display: block; font-size: 13px; margin-top: 2px; } .imp-stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.imp-warn { display: flex; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--blue-bg); }
.imp-warn.warn { background: var(--amber-bg); } .imp-warn i { font-style: normal; font-weight: 700; width: 12px; color: #2463BC; } .imp-warn.warn i { color: #B28500; }
.imp-warn .small { color: #4A4A4A; margin-top: 2px; }
.pill.imp { background: var(--blue-bg); color: #1D4F96; }
@media (max-width: 1100px) { .imp-grid { grid-template-columns: 1fr; } .imp-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .imp-tiles { grid-template-columns: 1fr; } }
.imp-stats > .box, .imp-grid > .box { margin-top: 0; }
.imp-grid .imp-h + .imp-tiles, .imp-grid .imp-h + .stack { margin-top: 0; }
.imp-grid > .stack > .imp-h:not(:first-child) { margin-top: 28px; }

.rem-row { padding: 12px 0; border-top: 1px solid var(--line2); } .dim { pointer-events: none; } .dim b, .dim .small { color: #B5B5B5 !important; }

/* ---- Brand v1 layer: pills, SemiBold headlines, lockup ---- */
h1, .empty h2, .big, .stat .v, .imp-stat .v { font-weight: 600; letter-spacing: -0.02em; }
a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
a:hover { text-decoration-color: currentColor; }
.btn, .btn.sm, .seg, .seg button, .pill, .toast { border-radius: 999px; }
.btn.primary:hover { background: var(--ink2); }
.in:focus, .codebox input:focus { box-shadow: 0 0 0 3px var(--line2); }
.card-auth, .modal { border-radius: var(--r2); }
.logo { width: 116px; height: 24px; font-size: 0; color: transparent; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 967 200'%3E%3Cg fill='%230A0A0B'%3E%3Cpath transform='scale(.42827)' d='M347 466C366 465 378 461 387 454C393 450 395 446 396 442C397 439 397 438 398 436C401 422 393 409 380 405C376 404 371 403 364 403C359 403 357 403 356 403C350 400 350 392 356 390C358 388 360 388 367 388C381 388 392 392 402 401C406 405 407 405 416 400C422 395 428 391 437 383C442 377 444 377 446 378C449 380 448 384 443 391C437 400 429 408 419 414C413 418 412 419 413 424C413 426 413 429 413 431C413 438 414 439 424 439C452 438 468 428 472 406C473 397 473 391 469 379C464 365 464 362 467 350C470 338 471 330 471 322C471 317 471 316 471 313C470 311 470 309 469 303C466 285 465 284 455 288C444 291 433 293 423 295C413 296 393 295 387 294C379 292 378 282 385 279C387 278 389 278 397 278C418 280 445 275 462 267C470 263 472 265 474 275C478 291 481 298 487 302C494 307 497 306 515 302C538 296 539 296 543 292C548 287 549 281 547 278C546 277 544 277 540 278C530 280 529 278 525 260C522 250 519 242 515 235C511 230 511 230 513 225C518 215 519 205 518 198C518 192 516 188 512 179C510 175 510 172 508 160C506 148 505 142 504 136C497 111 486 92 467 76C462 72 462 71 461 68C461 67 460 60 459 51C455 17 454 9 450 4C444-6 432 1 399 34C385 47 387 46 376 47C372 48 367 49 364 49C355 51 355 51 350 46C328 26 320 21 313 22C299 24 289 46 280 95C280 99 280 100 276 107C268 123 266 128 266 133C267 135 267 136 266 140C260 164 262 186 269 204C275 217 286 232 299 243C305 247 306 249 306 253C305 258 300 261 295 259C287 256 271 240 264 229C248 204 242 176 248 145C249 138 248 138 232 136C204 133 172 136 148 144C99 160 65 192 50 236C41 263 37 298 39 329C40 342 39 344 24 357C7 372 0 384 0 399C0 414 7 426 22 436C48 454 116 463 153 454C165 451 169 448 171 447C172 446 174 444 176 443C204 421 224 401 229 369C230 362 230 346 229 339C225 315 215 297 203 293C200 292 194 292 190 293C178 297 172 308 175 321C175 322 176 325 178 328C192 365 176 394 137 404C111 411 71 406 50 393C43 389 42 384 46 379C49 376 52 376 59 379C75 387 92 391 112 390C136 389 151 383 160 371C168 362 168 350 162 333C158 325 158 322 157 316C157 290 180 271 205 277C224 281 237 299 244 327C254 374 238 418 199 448C194 451 194 453 196 455C197 456 197 456 203 456C216 456 227 453 233 447C237 443 238 444 246 448C267 458 291 464 319 466C325 466 342 466 347 466ZM494 298C487 296 484 288 480 270C477 258 474 251 468 245C464 240 465 240 477 236C489 233 492 232 497 232C502 232 503 233 507 236C512 242 515 249 519 264C520 268 522 273 522 275C525 281 525 281 515 284C507 286 507 286 505 291C503 295 502 296 500 297C499 298 496 298 494 298ZM494 267C500 266 501 265 502 264C504 263 502 260 500 260C498 260 490 262 488 263C486 264 486 267 488 268C489 268 489 268 494 267ZM495 252C504 250 505 249 506 248C507 246 505 244 503 244C501 244 485 249 484 249C482 251 482 253 483 254C484 255 486 255 495 252ZM487 201C486 201 484 199 482 196C481 195 479 194 477 192C471 188 470 185 473 181C476 179 481 177 488 177C500 176 504 181 499 192C494 201 491 203 487 201Z'/%3E%3Cpath transform='translate(275 33)' d='M67 10C77 10 85 12 92 15C100 18 106 22 110 28C115 33 117 39 117 46C117 52 115 57 112 62C108 67 103 71 97 74C107 77 115 82 121 90C127 97 130 106 130 116C130 124 128 132 123 139C118 145 112 151 104 154C96 158 87 160 76 160H3C1 160 0 159 0 157V151C0 149 1 148 3 148C13 148 18 142 18 129V41C18 28 13 22 3 22C1 22 0 21 0 19V13C0 11 1 10 3 10H67ZM61 70C69 70 76 68 80 64C85 60 87 54 87 46C87 39 85 33 80 28C76 24 70 22 62 22H50V70H61ZM68 148C78 148 86 145 91 140C97 134 100 126 100 116C100 95 87 85 61 85H50V129C50 135 51 140 53 143C55 146 59 148 63 148H68ZM188 57C196 57 203 59 209 62C216 65 221 69 226 74C230 79 234 85 237 91C239 98 241 104 241 111C241 121 238 130 234 138C229 145 223 151 215 156C208 160 199 163 190 163C183 163 176 161 169 158C163 155 157 151 153 146C148 141 144 136 142 129C139 123 138 116 138 109C138 99 140 90 145 83C149 75 155 69 163 64C170 60 179 57 188 57ZM197 146C199 146 202 146 205 144C208 143 211 141 213 137C215 134 217 129 217 124C217 119 216 114 214 108C212 102 210 97 206 92C203 86 200 82 195 79C191 75 187 74 182 74C176 74 172 76 168 80C164 84 162 89 162 96C162 101 162 106 164 112C166 118 169 123 172 128C175 134 179 138 183 141C187 145 192 146 197 146ZM356 95V129C356 136 358 141 360 144C362 147 365 148 369 148H371C373 148 374 149 374 151V157C374 159 373 160 371 160H318C316 160 315 159 315 157V151C315 149 316 148 318 148H319C322 148 324 147 326 144C328 141 328 136 328 129V95C328 88 327 84 325 80C323 77 320 75 314 75C311 75 307 76 304 78C301 79 298 81 295 84C293 87 291 89 290 92V129C290 134 291 139 293 143C295 146 299 148 302 148H303C305 148 306 149 306 151V157C306 159 305 160 303 160H247C245 160 244 159 244 157V151C244 149 245 148 247 148H247C252 148 256 146 258 143C260 139 262 134 262 129V104C262 100 261 97 261 93C260 90 259 87 258 85C256 83 253 81 250 81C248 81 247 80 247 78V71C247 70 248 69 250 69C260 67 268 65 275 62C282 59 287 56 289 55C290 54 290 54 291 54H291C291 54 291 54 291 54C291 54 291 55 291 56L288 80C290 77 292 74 295 71C298 67 302 64 307 61C311 59 316 57 322 57C330 57 336 58 340 61C345 63 348 66 350 69C353 73 354 77 355 81C356 86 356 90 356 95ZM459 133C460 134 461 135 461 136C461 136 461 136 461 137C457 146 451 152 443 156C436 161 428 163 419 163C411 163 405 161 398 158C392 154 387 150 383 145C379 139 375 133 373 126C371 119 371 112 371 105C372 94 375 85 380 78C386 71 392 66 399 62C407 59 414 57 422 57C430 57 438 59 443 61C448 64 453 68 456 72C459 76 461 81 462 85C462 86 462 86 462 87C462 88 461 88 459 89L436 95C436 95 435 95 435 95C434 95 433 95 433 94C433 93 433 93 433 92C433 92 433 91 433 90C433 86 432 82 429 79C427 75 423 74 417 74C412 74 408 75 405 78C402 82 400 86 399 91C397 96 397 101 397 106C397 113 398 119 399 125C401 131 404 136 408 139C412 143 417 145 424 145C429 145 434 144 439 141C443 138 447 135 450 130C451 129 451 129 452 129C453 129 454 129 454 129L459 133ZM590 148C592 148 593 149 593 151V157C593 159 592 160 590 160H535C533 160 532 159 532 157V151C532 149 533 148 535 148H536C540 148 542 146 544 143C546 139 546 134 546 129V95C546 88 546 83 544 80C542 77 538 75 532 75C527 75 522 76 517 79C513 82 510 86 508 90V129C508 134 509 139 511 143C514 146 518 148 522 148H523C525 148 526 149 526 151V157C526 159 525 160 523 160H465C463 160 462 159 462 157V151C462 149 463 148 465 148H465C470 148 474 146 476 143C478 139 480 134 480 129V54C480 50 479 47 479 44C478 40 477 37 476 35C474 33 472 31 468 31C466 31 465 30 465 28V22C465 21 466 20 466 20C467 20 467 19 468 19C475 17 481 14 487 11C494 8 500 5 506 0C506 0 507 0 507 0H507C507 0 507 0 507 0V77C509 75 511 72 513 69C516 66 520 63 525 61C529 59 535 57 541 57C547 57 553 58 558 60C563 62 567 66 570 71C573 76 575 83 575 92V129C575 134 576 139 578 143C581 146 584 148 589 148H590ZM639 57C647 57 654 59 660 62C667 65 672 69 677 74C682 79 685 85 688 91C690 98 692 104 692 111C692 121 689 130 685 138C680 145 674 151 666 156C659 160 651 163 642 163C634 163 627 161 621 158C614 155 609 151 604 146C599 141 595 136 593 129C590 123 589 116 589 109C589 99 591 90 596 83C600 75 606 69 614 64C622 60 630 57 639 57ZM648 146C650 146 653 146 656 144C659 143 662 141 664 137C667 134 668 129 668 124C668 119 667 114 665 108C663 102 661 97 658 92C655 86 651 82 647 79C642 75 638 74 633 74C628 74 623 76 619 80C615 84 613 89 613 96C613 101 614 106 615 112C617 118 620 123 623 128C626 134 630 138 634 141C638 145 643 146 648 146Z'/%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat; text-decoration: none !important; }
.logo i { display: none; }
.rail a.m.on b { background: #FFFFFF; color: var(--ink); }
.mobilebar a.on .icon { color: #FFFFFF; }
.note.amber, .note.green, .note.blue, .imp-warn .small { color: var(--ink2); }
.pill.imp { background: var(--panel); color: var(--ink2); }
.imp-warn i, .imp-warn.warn i, .imp-stat .v.amber { color: var(--ink); }
.onb #ibanf.off .in { background: var(--panel); border-color: var(--line2); color: var(--faint); }
.note.amber, .note.green, .note.blue { box-shadow: inset 0 0 0 1px var(--line); }

/* ---- Brand v2: Figma app screens (D-C, A1…) ---- */
.mark { display: inline-block; width: 31px; height: 26px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 548 467'%3E%3Cpath fill-rule='evenodd' d='M347.172 466.11C365.672 464.79 378.412 461.04 387.412 454.27C393.042 450.04 395.064 445.62 396.002 442.12C396.94 438.62 397.002 437.986 397.502 436.12C400.702 421.65 393.152 409.43 379.882 404.91C376.022 403.6 371.292 403.08 363.692 403.14C359.232 403.18 356.502 403.06 355.872 402.82C349.802 400.42 349.572 392.47 355.502 389.54C358.112 388.24 360.212 387.95 366.832 387.96C381.262 387.99 391.742 392.01 401.642 401.32C405.782 405.22 406.542 405.13 415.502 399.64C422.412 395.41 428.412 390.58 436.562 382.69C442.052 377.39 443.532 376.66 445.942 378.13C449.082 380.04 448.312 383.9 443.452 390.67C436.682 400.11 428.812 407.66 418.672 414.45C412.782 418.4 412.262 419.29 412.962 424.24C413.162 425.73 413.332 428.83 413.342 431.12C413.342 438.18 413.972 438.65 423.502 438.56C452.392 438.31 467.702 427.87 471.802 405.62C473.392 396.98 472.692 391 468.652 378.54C464.202 364.86 464.042 361.81 467.112 349.79C470.172 337.81 471.272 329.94 471.002 321.62C470.862 317.39 470.881 316.12 470.502 313.12C470.249 311.12 470.002 308.62 469.002 303.12C465.638 284.62 465.142 284.19 454.712 287.59C444.352 290.95 433.212 293.41 422.672 294.64C412.602 295.82 392.522 295.49 387.172 294.07C379.052 291.91 377.872 282.03 385.342 278.82C387.442 277.910 388.942 277.86 397.172 278.42C418.102 279.84 445.032 275.26 461.502 267.48C470.012 263.47 471.792 264.53 474.162 275.12C477.802 291.33 481.102 298.17 487.262 302.22C493.782 306.52 496.982 306.49 514.502 302C537.802 296.03 538.892 295.63 542.812 291.64C547.522 286.86 549.232 281.03 546.782 278.12C545.552 276.65 544.242 276.56 539.762 277.62C530.432 279.82 529.232 278.42 524.832 260.12C522.292 249.58 519.322 242.41 514.552 235.32C510.972 230 510.932 229.64 513.212 224.66C517.542 215.22 519.402 205.46 518.362 197.68C517.612 192.02 516.442 188.43 512.382 179.23C510.472 174.92 509.922 172.38 508.192 160.22C506.402 147.59 505.352 141.7 503.972 136.45C497.392 111.4 485.682 92.26 467.122 76.26C462.462 72.24 461.552 70.99 461.192 68.12C461.092 67.29 460.172 59.79 459.162 51.45C454.922 16.68 453.562 9.49 450.332 4.48C443.682 -5.79 432.362 0.650002 398.952 33.7C385.362 47.14 387.072 46.11 376.492 47.28C372.282 47.75 366.662 48.52 364.002 49C354.872 50.63 355.362 50.74 350.002 45.81C328.142 25.69 320.252 20.57 312.892 21.77C299.242 23.98 289.332 46.44 280.372 95.45C279.692 99.15 279.522 99.58 275.532 107.45C267.622 123.06 265.672 128.39 266.302 132.77C266.682 135.49 266.652 135.82 265.692 140.14C260.432 163.66 261.522 185.63 268.842 203.5C274.502 217.32 285.832 231.91 299.172 242.56C304.582 246.88 305.902 248.94 305.572 252.57C305.072 258.08 299.532 261.3 294.502 259C287.392 255.74 271.412 240 263.992 228.94C247.562 204.45 242.112 176.47 247.702 145.18C248.962 138.11 248.142 137.63 232.172 135.96C203.632 132.98 172.052 136.04 147.672 144.13C98.9219 160.31 64.8819 192.36 50.4919 235.62C41.3419 263.13 37.0719 298.33 39.2019 328.89C40.1019 341.89 38.7319 344.48 24.3319 357.06C7.10189 372.11 0.161886 384.18 0.171886 399.12C0.171886 413.74 7.38189 425.94 21.8319 435.77C48.1719 453.68 116.272 463.01 153.122 453.76C164.842 450.82 169.062 447.56 170.532 446.59C172.002 445.62 173.819 444.232 175.872 442.65C203.952 421.016 224.062 401.01 229.052 369.09C230.152 362.12 230.172 345.52 229.102 338.78C225.282 314.72 215.242 297.14 203.172 293.37C199.982 292.38 194.012 292.39 190.232 293.4C178.212 296.63 171.622 308.35 174.942 320.62C175.282 321.9 176.482 325.28 177.592 328.12C191.942 364.78 176.372 393.75 136.822 403.96C110.972 410.62 70.9319 405.52 49.5519 392.84C42.9919 388.95 41.5019 383.55 45.7919 379.24C49.3319 375.69 51.8019 375.69 59.1719 379.29C75.1819 387.1 92.1819 390.55 111.982 390.01C135.592 389.37 151.442 383.3 160.412 371.45C167.722 361.81 168.172 349.53 161.812 333.45C158.382 324.8 157.632 321.76 157.422 315.850C156.502 289.94 179.912 270.79 205.182 276.77C223.862 281.2 237.492 299.02 243.832 327.29C254.292 373.97 237.702 418.5 198.832 448.02C194.392 451.39 193.632 453.41 196.112 455.25C196.992 455.9 197.462 455.95 202.942 455.94C216.152 455.9 226.782 452.78 233.272 447.01C237.242 443.48 237.732 443.51 246.382 447.9C266.582 458.14 290.892 464.23 319.002 466.08C325.072 466.48 341.752 466.5 347.172 466.11ZM494.172 297.83C487.472 296.07 483.542 288.49 479.712 269.95C477.322 258.37 473.862 250.64 468.472 244.81C464.252 240.25 464.562 239.95 477.242 236.33C488.572 233.09 492.472 232.31 497.332 232.3C502.042 232.28 503.042 232.72 506.552 236.31C512.312 242.22 515.242 248.71 518.972 263.79C520.042 268.09 521.542 273.23 522.312 275.19C524.682 281.24 524.592 281.35 515.282 283.88C507.172 286.08 506.822 286.31 504.752 290.76C502.932 294.67 502.062 295.86 500.232 296.93C498.692 297.84 495.822 298.26 494.172 297.83ZM494.352 266.95C499.712 265.64 500.662 265.32 501.852 264.38C503.702 262.92 502.342 260.12 499.772 260.12C498.372 260.12 489.592 262.3 488.292 262.97C486.242 264.04 486.072 266.57 488.002 267.54C489.442 268.26 488.692 268.33 494.352 266.95ZM495.002 252.12C503.562 249.9 504.922 249.38 505.632 248.1C506.592 246.35 505.122 244.45 502.812 244.45C501.472 244.45 485.492 248.69 484.032 249.44C481.802 250.58 481.522 252.59 483.422 253.96C484.472 254.72 485.822 254.51 495.002 252.12ZM487.172 201.49C485.882 200.91 484.192 199.26 481.622 196.08C480.962 195.26 478.882 193.56 477.002 192.3C470.942 188.24 469.782 184.83 473.302 181.43C476.002 178.81 481.052 177.24 487.832 176.89C500.042 176.26 503.962 181.47 498.912 191.62C494.492 200.52 491.152 203.32 487.172 201.49Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 548 467'%3E%3Cpath fill-rule='evenodd' d='M347.172 466.11C365.672 464.79 378.412 461.04 387.412 454.27C393.042 450.04 395.064 445.62 396.002 442.12C396.94 438.62 397.002 437.986 397.502 436.12C400.702 421.65 393.152 409.43 379.882 404.91C376.022 403.6 371.292 403.08 363.692 403.14C359.232 403.18 356.502 403.06 355.872 402.82C349.802 400.42 349.572 392.47 355.502 389.54C358.112 388.24 360.212 387.95 366.832 387.96C381.262 387.99 391.742 392.01 401.642 401.32C405.782 405.22 406.542 405.13 415.502 399.64C422.412 395.41 428.412 390.58 436.562 382.69C442.052 377.39 443.532 376.66 445.942 378.13C449.082 380.04 448.312 383.9 443.452 390.67C436.682 400.11 428.812 407.66 418.672 414.45C412.782 418.4 412.262 419.29 412.962 424.24C413.162 425.73 413.332 428.83 413.342 431.12C413.342 438.18 413.972 438.65 423.502 438.56C452.392 438.31 467.702 427.87 471.802 405.62C473.392 396.98 472.692 391 468.652 378.54C464.202 364.86 464.042 361.81 467.112 349.79C470.172 337.81 471.272 329.94 471.002 321.62C470.862 317.39 470.881 316.12 470.502 313.12C470.249 311.12 470.002 308.62 469.002 303.12C465.638 284.62 465.142 284.19 454.712 287.59C444.352 290.95 433.212 293.41 422.672 294.64C412.602 295.82 392.522 295.49 387.172 294.07C379.052 291.91 377.872 282.03 385.342 278.82C387.442 277.910 388.942 277.86 397.172 278.42C418.102 279.84 445.032 275.26 461.502 267.48C470.012 263.47 471.792 264.53 474.162 275.12C477.802 291.33 481.102 298.17 487.262 302.22C493.782 306.52 496.982 306.49 514.502 302C537.802 296.03 538.892 295.63 542.812 291.64C547.522 286.86 549.232 281.03 546.782 278.12C545.552 276.65 544.242 276.56 539.762 277.62C530.432 279.82 529.232 278.42 524.832 260.12C522.292 249.58 519.322 242.41 514.552 235.32C510.972 230 510.932 229.64 513.212 224.66C517.542 215.22 519.402 205.46 518.362 197.68C517.612 192.02 516.442 188.43 512.382 179.23C510.472 174.92 509.922 172.38 508.192 160.22C506.402 147.59 505.352 141.7 503.972 136.45C497.392 111.4 485.682 92.26 467.122 76.26C462.462 72.24 461.552 70.99 461.192 68.12C461.092 67.29 460.172 59.79 459.162 51.45C454.922 16.68 453.562 9.49 450.332 4.48C443.682 -5.79 432.362 0.650002 398.952 33.7C385.362 47.14 387.072 46.11 376.492 47.28C372.282 47.75 366.662 48.52 364.002 49C354.872 50.63 355.362 50.74 350.002 45.81C328.142 25.69 320.252 20.57 312.892 21.77C299.242 23.98 289.332 46.44 280.372 95.45C279.692 99.15 279.522 99.58 275.532 107.45C267.622 123.06 265.672 128.39 266.302 132.77C266.682 135.49 266.652 135.82 265.692 140.14C260.432 163.66 261.522 185.63 268.842 203.5C274.502 217.32 285.832 231.91 299.172 242.56C304.582 246.88 305.902 248.94 305.572 252.57C305.072 258.08 299.532 261.3 294.502 259C287.392 255.74 271.412 240 263.992 228.94C247.562 204.45 242.112 176.47 247.702 145.18C248.962 138.11 248.142 137.63 232.172 135.96C203.632 132.98 172.052 136.04 147.672 144.13C98.9219 160.31 64.8819 192.36 50.4919 235.62C41.3419 263.13 37.0719 298.33 39.2019 328.89C40.1019 341.89 38.7319 344.48 24.3319 357.06C7.10189 372.11 0.161886 384.18 0.171886 399.12C0.171886 413.74 7.38189 425.94 21.8319 435.77C48.1719 453.68 116.272 463.01 153.122 453.76C164.842 450.82 169.062 447.56 170.532 446.59C172.002 445.62 173.819 444.232 175.872 442.65C203.952 421.016 224.062 401.01 229.052 369.09C230.152 362.12 230.172 345.52 229.102 338.78C225.282 314.72 215.242 297.14 203.172 293.37C199.982 292.38 194.012 292.39 190.232 293.4C178.212 296.63 171.622 308.35 174.942 320.62C175.282 321.9 176.482 325.28 177.592 328.12C191.942 364.78 176.372 393.75 136.822 403.96C110.972 410.62 70.9319 405.52 49.5519 392.84C42.9919 388.95 41.5019 383.55 45.7919 379.24C49.3319 375.69 51.8019 375.69 59.1719 379.29C75.1819 387.1 92.1819 390.55 111.982 390.01C135.592 389.37 151.442 383.3 160.412 371.45C167.722 361.81 168.172 349.53 161.812 333.45C158.382 324.8 157.632 321.76 157.422 315.850C156.502 289.94 179.912 270.79 205.182 276.77C223.862 281.2 237.492 299.02 243.832 327.29C254.292 373.97 237.702 418.5 198.832 448.02C194.392 451.39 193.632 453.41 196.112 455.25C196.992 455.9 197.462 455.95 202.942 455.94C216.152 455.9 226.782 452.78 233.272 447.01C237.242 443.48 237.732 443.51 246.382 447.9C266.582 458.14 290.892 464.23 319.002 466.08C325.072 466.48 341.752 466.5 347.172 466.11ZM494.172 297.83C487.472 296.07 483.542 288.49 479.712 269.95C477.322 258.37 473.862 250.64 468.472 244.81C464.252 240.25 464.562 239.95 477.242 236.33C488.572 233.09 492.472 232.31 497.332 232.3C502.042 232.28 503.042 232.72 506.552 236.31C512.312 242.22 515.242 248.71 518.972 263.79C520.042 268.09 521.542 273.23 522.312 275.19C524.682 281.24 524.592 281.35 515.282 283.88C507.172 286.08 506.822 286.31 504.752 290.76C502.932 294.67 502.062 295.86 500.232 296.93C498.692 297.84 495.822 298.26 494.172 297.83ZM494.352 266.95C499.712 265.64 500.662 265.32 501.852 264.38C503.702 262.92 502.342 260.12 499.772 260.12C498.372 260.12 489.592 262.3 488.292 262.97C486.242 264.04 486.072 266.57 488.002 267.54C489.442 268.26 488.692 268.33 494.352 266.95ZM495.002 252.12C503.562 249.9 504.922 249.38 505.632 248.1C506.592 246.35 505.122 244.45 502.812 244.45C501.472 244.45 485.492 248.69 484.032 249.44C481.802 250.58 481.522 252.59 483.422 253.96C484.472 254.72 485.822 254.51 495.002 252.12ZM487.172 201.49C485.882 200.91 484.192 199.26 481.622 196.08C480.962 195.26 478.882 193.56 477.002 192.3C470.942 188.24 469.782 184.83 473.302 181.43C476.002 178.81 481.052 177.24 487.832 176.89C500.042 176.26 503.962 181.47 498.912 191.62C494.492 200.52 491.152 203.32 487.172 201.49Z'/%3E%3C/svg%3E") center / contain no-repeat; flex: none; }
.icon { stroke-width: 1.7; }
.btn { height: 44px; padding: 0 20px; font-size: 14px; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 13px; }
.btn.primary .icon, .btn .icon { width: 18px; height: 18px; }
.btn.sm .icon { width: 16px; height: 16px; }

/* Shell: rail 84 · menu 248 · main */
.shell { grid-template-columns: 84px 248px minmax(0, 1fr); }
.rail { padding: 20px 10px; gap: 6px; }
.rail .brand { color: #fff; display: grid; place-items: center; height: 26px; margin-bottom: 14px; text-decoration: none; }
.rail .org { width: 44px; height: 44px; border-radius: 12px; background: #2A2E33; color: #fff; font-weight: 600; margin-bottom: 10px; }
.rail a.m { width: 64px; padding: 10px 6px; border-radius: 14px; gap: 6px; color: var(--faint); font-size: 11px; font-weight: 500; text-decoration: none; }
.rail a.m .icon { width: 20px; height: 20px; }
.rail a.m:hover { background: #1F2226; }
.rail a.m.on { background: #2A2E33; color: #fff; font-weight: 600; }
.rail .me { width: 36px; height: 36px; font-size: 12px; margin-top: 12px; }
.side { padding: 24px 16px; border-right: 0; }
.sidehead { padding: 0 8px; margin-bottom: 16px; }
.sidehead b { display: block; font-size: 15px; font-weight: 600; }
.sidehead small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.side .new { width: 100%; justify-content: center; height: 47px; margin-bottom: 16px; }
.nav a { gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; text-decoration: none; }
.nav a .icon { width: 18px; height: 18px; }
.nav a:hover { background: var(--hover); text-decoration: none; }
.nav a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: none; }
.nav a .c, .nav a.on .c { background: none; padding: 0; font-size: 12px; font-weight: 500; color: var(--faint); }
.nav .sec { color: var(--faint); margin: 18px 12px 6px; }
.main { padding: 32px 40px 64px; }
.crumbs { font-size: 13px; font-weight: 500; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; }
.head { align-items: flex-end; margin-bottom: 24px; }
.head .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.search { position: relative; width: 300px; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px 0 40px; font-size: 14px; outline: none; background: #fff; }
.search input:focus { border-color: var(--ink); }
.search .icon { position: absolute; left: 15px; top: 12px; color: var(--faint); }

/* Summary cards */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.sc { background: var(--panel); border-radius: 22px; padding: 22px; min-height: 114px; display: flex; flex-direction: column; gap: 10px; }
.sc .l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sc .l .icon { width: 18px; height: 18px; color: var(--ink); }
.sc .v { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; white-space: nowrap; }
.sc .v i, .big i { font-style: normal; font-size: .56em; color: var(--faint); margin-left: 6px; }
.sc.ink { background: var(--ink2); color: #fff; }
.sc.ink .l { color: var(--faint); } .sc.ink .l .icon { color: #fff; }
.sc .l .icon[viewBox] { flex: none; }
.cards3 .sc:nth-child(2) .l .icon { color: var(--red); }
.cards3.neutral .sc:nth-child(2) .l .icon { color: var(--ink); }

/* Filters + table + detail */
.split { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.listcol { min-width: 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.listcol > .box { width: 100%; }
.seg { background: var(--panel); border: 0; padding: 4px; gap: 2px; }
.seg button { height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: none; }
.box { border-radius: 20px; }
.box.tbl { padding: 6px 20px; }
table.t th { font-size: 11px; color: var(--faint); padding: 10px 6px; border-bottom: 0; }
table.t td { padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: none; }
table.t tbody tr.sel td { background: var(--panel); border-bottom-color: transparent; }
table.t tbody tr.sel td:first-child { box-shadow: none; border-radius: 12px 0 0 12px; padding-left: 16px; }
table.t tbody tr.sel td:last-child { border-radius: 0 12px 12px 0; padding-right: 10px; }
table.t th.go, table.t td.go { width: 28px; text-align: right; color: var(--faint); }
table.t td.go .icon { width: 16px; height: 16px; }
table.t tr.sel td.go { color: var(--ink); }
.dot { gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink); }
.dot::before { display: none; }
.dot .icon { width: 18px; height: 18px; color: var(--ink); }
.dot.st-overdue { color: var(--ink); } .dot.st-overdue .icon { color: var(--red); }
.dot.st-draft { color: var(--muted); } .dot.st-draft .icon { color: var(--faint); }
.dot.st-cancelled { color: var(--faint); } .dot.st-cancelled .icon { color: var(--faint); }

.panel { border-radius: 24px; padding: 28px; }
.panel.dark { background: var(--ink2); border: 0; color: #fff; display: flex; flex-direction: column; gap: 16px; }
.panel.dark .small { color: var(--faint); }
.panel.dark .dh { display: flex; align-items: center; gap: 8px; }
.panel.dark .dh b { font-size: 17px; font-weight: 600; flex: 1; min-width: 0; }
.panel.dark .dh .dot { color: var(--faint); }
.panel.dark .dh .dot .icon { color: var(--faint); } .panel.dark .dh .dot.st-overdue .icon { color: var(--red); }
.panel.dark .iconbtn { background: transparent; border: 0; color: var(--faint); width: 28px; height: 28px; }
.panel.dark .iconbtn:hover { color: #fff; background: #1F2226; }
.panel.dark .dacts { display: flex; gap: 8px; }
.panel.dark .dacts .btn { flex: 1; }
.panel.dark .btn { background: transparent; border-color: #3A3F45; color: #fff; }
.panel.dark .btn:hover { background: #1F2226; }
.panel.dark .btn.primary { background: #fff; border-color: #fff; color: var(--ink); }
.panel.dark .btn.primary:hover { background: var(--line2); }
.panel.dark .btn.ghost { border-color: transparent; color: var(--faint); }
.panel.dark .lbl { font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.panel.dark .who { font-size: 17px; font-weight: 600; }
.panel.dark .big { font-size: 48px; font-weight: 500; line-height: 1.05; }
.panel.dark .big i { font-size: 24px; }
.panel.dark .kv { border-bottom: 1px solid #2A2E33; padding: 12px 0; font-size: 14px; }
.panel.dark .kv:last-child { border-bottom: 1px solid #2A2E33; }
.panel.dark .kv > span:first-child { color: var(--faint); }
.panel.dark .dnote { display: flex; gap: 10px; background: #1F2226; border-radius: 14px; padding: 14px; font-size: 13px; color: var(--faint); }
.panel.dark .dnote .icon { width: 18px; height: 18px; margin-top: 1px; }
.panel.dark .dbtns { display: flex; flex-direction: column; gap: 10px; }
.panel.dark .dbtns .btn { width: 100%; height: 47px; }
.panel.dark .dbtns .btn.sm { height: 40px; }
.mtop .mark { color: var(--ink); width: 24px; height: 20px; }
@media (max-width: 1280px) { .cards3 .sc .v { font-size: 26px; } }
@media (max-width: 1180px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .main { padding: 16px 16px 96px; }
  h1 { font-size: 28px; }
  .head { align-items: stretch; }
  .search { width: 100%; }
  .cards3 { grid-template-columns: 1fr; gap: 10px; }
  .cards3 .sc { min-height: 0; padding: 18px; }
  .cards3 .sc .v { font-size: 26px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .box.tbl { padding: 4px 14px; }
  table.t.cards tr { padding: 12px 0; border-bottom: 1px solid var(--line); grid-template-columns: 1fr auto; row-gap: 4px; }
  table.t.cards tr:last-child { border-bottom: 0; }
  table.t.cards td { padding: 0; border: 0; }
  table.t.cards td.go { display: none; }
  table.t.cards tbody tr.sel td { background: none; }
  .mobilebar a.on { color: #fff; }
}
.panel.dark .dacts .btn { padding: 0 10px; min-width: 0; }
.panel.dark .dh .dot { font-size: 12px; }

/* Auth (A1–A6): ink brand side + form side */
.auth { display: grid; grid-template-columns: minmax(0, 620fr) minmax(0, 820fr); flex-direction: row; min-height: 100vh; }
.brandside { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.lockup { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.lockup .mark { width: 35px; height: 30px; }
.lockup:hover { text-decoration: none; }
.catcard { margin-top: auto; background: var(--panel); border-radius: 28px; aspect-ratio: 508 / 400; display: grid; place-items: center; overflow: hidden; max-height: 46vh; }
.catcard img { width: 83%; height: auto; max-height: 105%; object-fit: contain; }
.brandside .tag { margin-top: 32px; }
.brandside .tag .mark.big { display: none; }
.brandside h2 { font-size: 40px; line-height: 1.12; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.brandside h2 span { color: var(--faint); }
.brandside p { margin: 16px 0 0; color: var(--faint); font-size: 15px; max-width: 508px; }
.formside { display: flex; flex-direction: column; padding: 56px; min-width: 0; }
.formside main { flex: 1; display: grid; place-items: center; padding: 0; }
.formside footer { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: 12px; padding: 0; text-align: left; }
.formside footer a { color: var(--faint); text-decoration: none; }
.formside footer a:hover { color: var(--ink); }
.card-auth { max-width: 400px; background: transparent; padding: 0; border-radius: 0; }
.card-auth h1 { font-size: 40px; line-height: 1.08; margin-bottom: 28px; }
.card-auth .lead { font-size: 16px; color: var(--muted); margin: 0 0 28px; }
.card-auth .stack > * + * { margin-top: 28px; }
.card-auth label.f > span { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.card-auth .in { height: 55px; border-radius: 14px; font-size: 15px; padding: 0 16px; }
.card-auth .btn.block, .card-auth .btn.lg { height: 55px; font-size: 15px; }
.card-auth .alt { margin: 28px 0 0; font-size: 14px; color: var(--ink); }
.card-auth .alt a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink); }
.card-auth .alt .link { color: var(--ink); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.card-auth .alt .link.b { font-weight: 600; text-decoration: none; }
.card-auth .alt + .alt { margin-top: 8px; }
.step { display: inline-block; background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.codebox { gap: 10px; margin: 0 0 28px; }
.codebox input { width: 58px; height: 58px; border-radius: 14px; font-size: 22px; }
.codebox input:focus { border: 2px solid var(--ink); box-shadow: none; }
.codebox input.err { border-color: var(--red); }
.btn.primary:disabled { background: #B4B4B8; border-color: #B4B4B8; color: #fff; }
.msg { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 12px 14px; font-size: 13px; margin: -12px 0 20px; background: var(--panel); color: var(--ink); }
.msg::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.msg.err { background: var(--red-bg); } .msg.err::before { background: var(--red); }
.orgpick { display: flex; flex-direction: column; gap: 10px; }
.orgpick button { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; border-radius: 14px; padding: 12px 16px 12px 12px; background: var(--panel); text-align: left; cursor: pointer; color: var(--ink); }
.orgpick button:hover { background: var(--hover); }
.orgpick button > b { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.orgpick button span { flex: 1; min-width: 0; }
.orgpick strong { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgpick small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.orgpick .icon { color: var(--faint); }
.orgpick button.on { background: var(--ink); color: #fff; }
.orgpick button.on > b { background: #2A2E33; color: #fff; }
.orgpick button.on small { color: var(--faint); } .orgpick button.on .icon { color: #fff; }
.addorg { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.addorg .icon { width: 16px; height: 16px; }
@media (max-width: 1100px) { .brandside { padding: 40px; } .brandside h2 { font-size: 32px; } .formside { padding: 40px; } }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brandside { position: static; height: auto; padding: 20px 20px 28px; gap: 14px; }
  .lockup { font-size: 21px; gap: 7px; } .lockup .mark { width: 26px; height: 22px; }
  .catcard, .brandside p { display: none; }
  .brandside .tag { margin: 0; display: flex; align-items: center; gap: 12px; }
  .brandside .tag .mark.big { display: block; width: 66px; height: 56px; color: #fff; }
  .brandside h2 { font-size: 22px; font-weight: 400; line-height: 1.5; }
  .formside { padding: 32px 20px 24px; }
  .formside main { place-items: start stretch; }
  .formside footer { justify-content: flex-start; gap: 12px; font-size: 11px; margin-top: 28px; }
  .card-auth { max-width: none; }
  .card-auth h1 { font-size: 30px; margin-bottom: 18px; }
  .card-auth .lead { font-size: 15px; margin-bottom: 18px; }
  .card-auth .stack > * + * { margin-top: 18px; }
  .card-auth .in { height: 48px; border-radius: 12px; font-size: 14px; }
  .card-auth .alt { font-size: 13px; margin-top: 18px; color: var(--muted); }
  .codebox input { width: auto; flex: 1; min-width: 0; height: 52px; }
}

/* Lockup as a mask so it takes the text colour (white on the brand side). */
.lockup { width: 153px; height: 30px; font-size: 0; color: #fff; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 967 200'%3E%3Cg fill='%230A0A0B'%3E%3Cpath transform='scale%28.42827%29' d='M347 466C366 465 378 461 387 454C393 450 395 446 396 442C397 439 397 438 398 436C401 422 393 409 380 405C376 404 371 403 364 403C359 403 357 403 356 403C350 400 350 392 356 390C358 388 360 388 367 388C381 388 392 392 402 401C406 405 407 405 416 400C422 395 428 391 437 383C442 377 444 377 446 378C449 380 448 384 443 391C437 400 429 408 419 414C413 418 412 419 413 424C413 426 413 429 413 431C413 438 414 439 424 439C452 438 468 428 472 406C473 397 473 391 469 379C464 365 464 362 467 350C470 338 471 330 471 322C471 317 471 316 471 313C470 311 470 309 469 303C466 285 465 284 455 288C444 291 433 293 423 295C413 296 393 295 387 294C379 292 378 282 385 279C387 278 389 278 397 278C418 280 445 275 462 267C470 263 472 265 474 275C478 291 481 298 487 302C494 307 497 306 515 302C538 296 539 296 543 292C548 287 549 281 547 278C546 277 544 277 540 278C530 280 529 278 525 260C522 250 519 242 515 235C511 230 511 230 513 225C518 215 519 205 518 198C518 192 516 188 512 179C510 175 510 172 508 160C506 148 505 142 504 136C497 111 486 92 467 76C462 72 462 71 461 68C461 67 460 60 459 51C455 17 454 9 450 4C444-6 432 1 399 34C385 47 387 46 376 47C372 48 367 49 364 49C355 51 355 51 350 46C328 26 320 21 313 22C299 24 289 46 280 95C280 99 280 100 276 107C268 123 266 128 266 133C267 135 267 136 266 140C260 164 262 186 269 204C275 217 286 232 299 243C305 247 306 249 306 253C305 258 300 261 295 259C287 256 271 240 264 229C248 204 242 176 248 145C249 138 248 138 232 136C204 133 172 136 148 144C99 160 65 192 50 236C41 263 37 298 39 329C40 342 39 344 24 357C7 372 0 384 0 399C0 414 7 426 22 436C48 454 116 463 153 454C165 451 169 448 171 447C172 446 174 444 176 443C204 421 224 401 229 369C230 362 230 346 229 339C225 315 215 297 203 293C200 292 194 292 190 293C178 297 172 308 175 321C175 322 176 325 178 328C192 365 176 394 137 404C111 411 71 406 50 393C43 389 42 384 46 379C49 376 52 376 59 379C75 387 92 391 112 390C136 389 151 383 160 371C168 362 168 350 162 333C158 325 158 322 157 316C157 290 180 271 205 277C224 281 237 299 244 327C254 374 238 418 199 448C194 451 194 453 196 455C197 456 197 456 203 456C216 456 227 453 233 447C237 443 238 444 246 448C267 458 291 464 319 466C325 466 342 466 347 466ZM494 298C487 296 484 288 480 270C477 258 474 251 468 245C464 240 465 240 477 236C489 233 492 232 497 232C502 232 503 233 507 236C512 242 515 249 519 264C520 268 522 273 522 275C525 281 525 281 515 284C507 286 507 286 505 291C503 295 502 296 500 297C499 298 496 298 494 298ZM494 267C500 266 501 265 502 264C504 263 502 260 500 260C498 260 490 262 488 263C486 264 486 267 488 268C489 268 489 268 494 267ZM495 252C504 250 505 249 506 248C507 246 505 244 503 244C501 244 485 249 484 249C482 251 482 253 483 254C484 255 486 255 495 252ZM487 201C486 201 484 199 482 196C481 195 479 194 477 192C471 188 470 185 473 181C476 179 481 177 488 177C500 176 504 181 499 192C494 201 491 203 487 201Z'/%3E%3Cpath transform='translate%28275 33%29' d='M67 10C77 10 85 12 92 15C100 18 106 22 110 28C115 33 117 39 117 46C117 52 115 57 112 62C108 67 103 71 97 74C107 77 115 82 121 90C127 97 130 106 130 116C130 124 128 132 123 139C118 145 112 151 104 154C96 158 87 160 76 160H3C1 160 0 159 0 157V151C0 149 1 148 3 148C13 148 18 142 18 129V41C18 28 13 22 3 22C1 22 0 21 0 19V13C0 11 1 10 3 10H67ZM61 70C69 70 76 68 80 64C85 60 87 54 87 46C87 39 85 33 80 28C76 24 70 22 62 22H50V70H61ZM68 148C78 148 86 145 91 140C97 134 100 126 100 116C100 95 87 85 61 85H50V129C50 135 51 140 53 143C55 146 59 148 63 148H68ZM188 57C196 57 203 59 209 62C216 65 221 69 226 74C230 79 234 85 237 91C239 98 241 104 241 111C241 121 238 130 234 138C229 145 223 151 215 156C208 160 199 163 190 163C183 163 176 161 169 158C163 155 157 151 153 146C148 141 144 136 142 129C139 123 138 116 138 109C138 99 140 90 145 83C149 75 155 69 163 64C170 60 179 57 188 57ZM197 146C199 146 202 146 205 144C208 143 211 141 213 137C215 134 217 129 217 124C217 119 216 114 214 108C212 102 210 97 206 92C203 86 200 82 195 79C191 75 187 74 182 74C176 74 172 76 168 80C164 84 162 89 162 96C162 101 162 106 164 112C166 118 169 123 172 128C175 134 179 138 183 141C187 145 192 146 197 146ZM356 95V129C356 136 358 141 360 144C362 147 365 148 369 148H371C373 148 374 149 374 151V157C374 159 373 160 371 160H318C316 160 315 159 315 157V151C315 149 316 148 318 148H319C322 148 324 147 326 144C328 141 328 136 328 129V95C328 88 327 84 325 80C323 77 320 75 314 75C311 75 307 76 304 78C301 79 298 81 295 84C293 87 291 89 290 92V129C290 134 291 139 293 143C295 146 299 148 302 148H303C305 148 306 149 306 151V157C306 159 305 160 303 160H247C245 160 244 159 244 157V151C244 149 245 148 247 148H247C252 148 256 146 258 143C260 139 262 134 262 129V104C262 100 261 97 261 93C260 90 259 87 258 85C256 83 253 81 250 81C248 81 247 80 247 78V71C247 70 248 69 250 69C260 67 268 65 275 62C282 59 287 56 289 55C290 54 290 54 291 54H291C291 54 291 54 291 54C291 54 291 55 291 56L288 80C290 77 292 74 295 71C298 67 302 64 307 61C311 59 316 57 322 57C330 57 336 58 340 61C345 63 348 66 350 69C353 73 354 77 355 81C356 86 356 90 356 95ZM459 133C460 134 461 135 461 136C461 136 461 136 461 137C457 146 451 152 443 156C436 161 428 163 419 163C411 163 405 161 398 158C392 154 387 150 383 145C379 139 375 133 373 126C371 119 371 112 371 105C372 94 375 85 380 78C386 71 392 66 399 62C407 59 414 57 422 57C430 57 438 59 443 61C448 64 453 68 456 72C459 76 461 81 462 85C462 86 462 86 462 87C462 88 461 88 459 89L436 95C436 95 435 95 435 95C434 95 433 95 433 94C433 93 433 93 433 92C433 92 433 91 433 90C433 86 432 82 429 79C427 75 423 74 417 74C412 74 408 75 405 78C402 82 400 86 399 91C397 96 397 101 397 106C397 113 398 119 399 125C401 131 404 136 408 139C412 143 417 145 424 145C429 145 434 144 439 141C443 138 447 135 450 130C451 129 451 129 452 129C453 129 454 129 454 129L459 133ZM590 148C592 148 593 149 593 151V157C593 159 592 160 590 160H535C533 160 532 159 532 157V151C532 149 533 148 535 148H536C540 148 542 146 544 143C546 139 546 134 546 129V95C546 88 546 83 544 80C542 77 538 75 532 75C527 75 522 76 517 79C513 82 510 86 508 90V129C508 134 509 139 511 143C514 146 518 148 522 148H523C525 148 526 149 526 151V157C526 159 525 160 523 160H465C463 160 462 159 462 157V151C462 149 463 148 465 148H465C470 148 474 146 476 143C478 139 480 134 480 129V54C480 50 479 47 479 44C478 40 477 37 476 35C474 33 472 31 468 31C466 31 465 30 465 28V22C465 21 466 20 466 20C467 20 467 19 468 19C475 17 481 14 487 11C494 8 500 5 506 0C506 0 507 0 507 0H507C507 0 507 0 507 0V77C509 75 511 72 513 69C516 66 520 63 525 61C529 59 535 57 541 57C547 57 553 58 558 60C563 62 567 66 570 71C573 76 575 83 575 92V129C575 134 576 139 578 143C581 146 584 148 589 148H590ZM639 57C647 57 654 59 660 62C667 65 672 69 677 74C682 79 685 85 688 91C690 98 692 104 692 111C692 121 689 130 685 138C680 145 674 151 666 156C659 160 651 163 642 163C634 163 627 161 621 158C614 155 609 151 604 146C599 141 595 136 593 129C590 123 589 116 589 109C589 99 591 90 596 83C600 75 606 69 614 64C622 60 630 57 639 57ZM648 146C650 146 653 146 656 144C659 143 662 141 664 137C667 134 668 129 668 124C668 119 667 114 665 108C663 102 661 97 658 92C655 86 651 82 647 79C642 75 638 74 633 74C628 74 623 76 619 80C615 84 613 89 613 96C613 101 614 106 615 112C617 118 620 123 623 128C626 134 630 138 634 141C638 145 643 146 648 146Z'/%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 967 200'%3E%3Cg fill='%230A0A0B'%3E%3Cpath transform='scale%28.42827%29' d='M347 466C366 465 378 461 387 454C393 450 395 446 396 442C397 439 397 438 398 436C401 422 393 409 380 405C376 404 371 403 364 403C359 403 357 403 356 403C350 400 350 392 356 390C358 388 360 388 367 388C381 388 392 392 402 401C406 405 407 405 416 400C422 395 428 391 437 383C442 377 444 377 446 378C449 380 448 384 443 391C437 400 429 408 419 414C413 418 412 419 413 424C413 426 413 429 413 431C413 438 414 439 424 439C452 438 468 428 472 406C473 397 473 391 469 379C464 365 464 362 467 350C470 338 471 330 471 322C471 317 471 316 471 313C470 311 470 309 469 303C466 285 465 284 455 288C444 291 433 293 423 295C413 296 393 295 387 294C379 292 378 282 385 279C387 278 389 278 397 278C418 280 445 275 462 267C470 263 472 265 474 275C478 291 481 298 487 302C494 307 497 306 515 302C538 296 539 296 543 292C548 287 549 281 547 278C546 277 544 277 540 278C530 280 529 278 525 260C522 250 519 242 515 235C511 230 511 230 513 225C518 215 519 205 518 198C518 192 516 188 512 179C510 175 510 172 508 160C506 148 505 142 504 136C497 111 486 92 467 76C462 72 462 71 461 68C461 67 460 60 459 51C455 17 454 9 450 4C444-6 432 1 399 34C385 47 387 46 376 47C372 48 367 49 364 49C355 51 355 51 350 46C328 26 320 21 313 22C299 24 289 46 280 95C280 99 280 100 276 107C268 123 266 128 266 133C267 135 267 136 266 140C260 164 262 186 269 204C275 217 286 232 299 243C305 247 306 249 306 253C305 258 300 261 295 259C287 256 271 240 264 229C248 204 242 176 248 145C249 138 248 138 232 136C204 133 172 136 148 144C99 160 65 192 50 236C41 263 37 298 39 329C40 342 39 344 24 357C7 372 0 384 0 399C0 414 7 426 22 436C48 454 116 463 153 454C165 451 169 448 171 447C172 446 174 444 176 443C204 421 224 401 229 369C230 362 230 346 229 339C225 315 215 297 203 293C200 292 194 292 190 293C178 297 172 308 175 321C175 322 176 325 178 328C192 365 176 394 137 404C111 411 71 406 50 393C43 389 42 384 46 379C49 376 52 376 59 379C75 387 92 391 112 390C136 389 151 383 160 371C168 362 168 350 162 333C158 325 158 322 157 316C157 290 180 271 205 277C224 281 237 299 244 327C254 374 238 418 199 448C194 451 194 453 196 455C197 456 197 456 203 456C216 456 227 453 233 447C237 443 238 444 246 448C267 458 291 464 319 466C325 466 342 466 347 466ZM494 298C487 296 484 288 480 270C477 258 474 251 468 245C464 240 465 240 477 236C489 233 492 232 497 232C502 232 503 233 507 236C512 242 515 249 519 264C520 268 522 273 522 275C525 281 525 281 515 284C507 286 507 286 505 291C503 295 502 296 500 297C499 298 496 298 494 298ZM494 267C500 266 501 265 502 264C504 263 502 260 500 260C498 260 490 262 488 263C486 264 486 267 488 268C489 268 489 268 494 267ZM495 252C504 250 505 249 506 248C507 246 505 244 503 244C501 244 485 249 484 249C482 251 482 253 483 254C484 255 486 255 495 252ZM487 201C486 201 484 199 482 196C481 195 479 194 477 192C471 188 470 185 473 181C476 179 481 177 488 177C500 176 504 181 499 192C494 201 491 203 487 201Z'/%3E%3Cpath transform='translate%28275 33%29' d='M67 10C77 10 85 12 92 15C100 18 106 22 110 28C115 33 117 39 117 46C117 52 115 57 112 62C108 67 103 71 97 74C107 77 115 82 121 90C127 97 130 106 130 116C130 124 128 132 123 139C118 145 112 151 104 154C96 158 87 160 76 160H3C1 160 0 159 0 157V151C0 149 1 148 3 148C13 148 18 142 18 129V41C18 28 13 22 3 22C1 22 0 21 0 19V13C0 11 1 10 3 10H67ZM61 70C69 70 76 68 80 64C85 60 87 54 87 46C87 39 85 33 80 28C76 24 70 22 62 22H50V70H61ZM68 148C78 148 86 145 91 140C97 134 100 126 100 116C100 95 87 85 61 85H50V129C50 135 51 140 53 143C55 146 59 148 63 148H68ZM188 57C196 57 203 59 209 62C216 65 221 69 226 74C230 79 234 85 237 91C239 98 241 104 241 111C241 121 238 130 234 138C229 145 223 151 215 156C208 160 199 163 190 163C183 163 176 161 169 158C163 155 157 151 153 146C148 141 144 136 142 129C139 123 138 116 138 109C138 99 140 90 145 83C149 75 155 69 163 64C170 60 179 57 188 57ZM197 146C199 146 202 146 205 144C208 143 211 141 213 137C215 134 217 129 217 124C217 119 216 114 214 108C212 102 210 97 206 92C203 86 200 82 195 79C191 75 187 74 182 74C176 74 172 76 168 80C164 84 162 89 162 96C162 101 162 106 164 112C166 118 169 123 172 128C175 134 179 138 183 141C187 145 192 146 197 146ZM356 95V129C356 136 358 141 360 144C362 147 365 148 369 148H371C373 148 374 149 374 151V157C374 159 373 160 371 160H318C316 160 315 159 315 157V151C315 149 316 148 318 148H319C322 148 324 147 326 144C328 141 328 136 328 129V95C328 88 327 84 325 80C323 77 320 75 314 75C311 75 307 76 304 78C301 79 298 81 295 84C293 87 291 89 290 92V129C290 134 291 139 293 143C295 146 299 148 302 148H303C305 148 306 149 306 151V157C306 159 305 160 303 160H247C245 160 244 159 244 157V151C244 149 245 148 247 148H247C252 148 256 146 258 143C260 139 262 134 262 129V104C262 100 261 97 261 93C260 90 259 87 258 85C256 83 253 81 250 81C248 81 247 80 247 78V71C247 70 248 69 250 69C260 67 268 65 275 62C282 59 287 56 289 55C290 54 290 54 291 54H291C291 54 291 54 291 54C291 54 291 55 291 56L288 80C290 77 292 74 295 71C298 67 302 64 307 61C311 59 316 57 322 57C330 57 336 58 340 61C345 63 348 66 350 69C353 73 354 77 355 81C356 86 356 90 356 95ZM459 133C460 134 461 135 461 136C461 136 461 136 461 137C457 146 451 152 443 156C436 161 428 163 419 163C411 163 405 161 398 158C392 154 387 150 383 145C379 139 375 133 373 126C371 119 371 112 371 105C372 94 375 85 380 78C386 71 392 66 399 62C407 59 414 57 422 57C430 57 438 59 443 61C448 64 453 68 456 72C459 76 461 81 462 85C462 86 462 86 462 87C462 88 461 88 459 89L436 95C436 95 435 95 435 95C434 95 433 95 433 94C433 93 433 93 433 92C433 92 433 91 433 90C433 86 432 82 429 79C427 75 423 74 417 74C412 74 408 75 405 78C402 82 400 86 399 91C397 96 397 101 397 106C397 113 398 119 399 125C401 131 404 136 408 139C412 143 417 145 424 145C429 145 434 144 439 141C443 138 447 135 450 130C451 129 451 129 452 129C453 129 454 129 454 129L459 133ZM590 148C592 148 593 149 593 151V157C593 159 592 160 590 160H535C533 160 532 159 532 157V151C532 149 533 148 535 148H536C540 148 542 146 544 143C546 139 546 134 546 129V95C546 88 546 83 544 80C542 77 538 75 532 75C527 75 522 76 517 79C513 82 510 86 508 90V129C508 134 509 139 511 143C514 146 518 148 522 148H523C525 148 526 149 526 151V157C526 159 525 160 523 160H465C463 160 462 159 462 157V151C462 149 463 148 465 148H465C470 148 474 146 476 143C478 139 480 134 480 129V54C480 50 479 47 479 44C478 40 477 37 476 35C474 33 472 31 468 31C466 31 465 30 465 28V22C465 21 466 20 466 20C467 20 467 19 468 19C475 17 481 14 487 11C494 8 500 5 506 0C506 0 507 0 507 0H507C507 0 507 0 507 0V77C509 75 511 72 513 69C516 66 520 63 525 61C529 59 535 57 541 57C547 57 553 58 558 60C563 62 567 66 570 71C573 76 575 83 575 92V129C575 134 576 139 578 143C581 146 584 148 589 148H590ZM639 57C647 57 654 59 660 62C667 65 672 69 677 74C682 79 685 85 688 91C690 98 692 104 692 111C692 121 689 130 685 138C680 145 674 151 666 156C659 160 651 163 642 163C634 163 627 161 621 158C614 155 609 151 604 146C599 141 595 136 593 129C590 123 589 116 589 109C589 99 591 90 596 83C600 75 606 69 614 64C622 60 630 57 639 57ZM648 146C650 146 653 146 656 144C659 143 662 141 664 137C667 134 668 129 668 124C668 119 667 114 665 108C663 102 661 97 658 92C655 86 651 82 647 79C642 75 638 74 633 74C628 74 623 76 619 80C615 84 613 89 613 96C613 101 614 106 615 112C617 118 620 123 623 128C626 134 630 138 634 141C638 145 643 146 648 146Z'/%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat; }
.lockup .mark, .lockup span { display: none; }
@media (max-width: 860px) { .lockup { width: 112px; height: 22px; } .formside main { flex: none; } .formside footer { margin-top: 32px; } }

/* Onboarding A5/A6 sizes */
.card-auth.onb h1, .card-auth h1 { font-size: 36px; margin-bottom: 18px; }
.card-auth .lead { margin-bottom: 22px; }
.card-auth .stack > * + *, .onb .stack > * + * { margin-top: 18px; }
.onb label.f > span:first-child, .card-auth label.f > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.onb .lbl2 small { font-size: 12px; color: var(--muted); }
.card-auth .in, .onb .in { height: 46px; border-radius: 12px; font-size: 14px; }
.card-auth .btn.block, .card-auth .btn.lg { height: 52px; }
.onb .acts-auth { gap: 12px; padding-top: 6px; }
.onb label.f > span.foundline { background: var(--panel); border-radius: 12px; padding: 10px 14px; color: var(--ink); font-size: 13px; font-weight: 600; margin-top: 12px; }
.onb label.f > span.foundline::before { content: '✓'; margin-right: 8px; font-weight: 600; }
.onb .foundline .link { color: var(--muted); font-weight: 500; }
.onb label.f > span.hint.ok { color: var(--muted); font-weight: 400; }
.onb label.f > span.hint.ok::before { content: '✓ '; }
.onb .inwrap .ok { color: var(--ink); }
.onb #ibanf.off .in { background: var(--panel); border-color: var(--panel); }
.check.consent { align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.5; }
.check.consent input { accent-color: var(--ink); margin-top: 1px; }
.check.consent a { color: var(--muted); }
.note { border-radius: 14px; }
@media (max-width: 860px) { .card-auth h1, .card-auth.onb h1 { font-size: 30px; } }
.onb label.f > span.note.exists, .note.exists { display: flex; align-items: center; gap: 12px; background: var(--panel); box-shadow: none; color: var(--muted); padding: 16px; font-size: 12px; }
.note.exists .icon { flex: none; color: var(--ink); }
.note.exists b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.note.exists .btn { flex: none; height: 36px; }

/* D-B cross-sell: banner over the invoices, card at the foot of the menu */
.side { display: flex; flex-direction: column; }
.xsell { margin-top: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 16px; color: var(--ink); text-decoration: none; }
.xsell:hover { text-decoration: none; border-color: var(--ink); }
.xsell .mark { width: 28px; height: 24px; color: var(--ink); margin-bottom: 10px; display: block; }
.xsell b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.xsell span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.xsell em { display: block; font-style: normal; font-size: 12px; font-weight: 600; margin-top: 10px; }
.banner { display: flex; align-items: center; gap: 14px; background: var(--ink2); color: #fff; border-radius: 18px; padding: 12px 14px 12px 12px; margin-bottom: 20px; }
.banner > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 10px; background: #2A2E33; flex: none; }
.banner b { display: block; font-size: 14px; font-weight: 600; }
.banner span { display: block; font-size: 13px; color: var(--faint); }
.banner .btn { background: #fff; color: var(--ink); border-color: #fff; }
.banner .iconbtn { background: transparent; border: 0; color: var(--faint); }
.banner .iconbtn:hover { color: #fff; }

/* Phone: single column (must follow the desktop grid above) */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail, .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .side.open .xsell { margin-top: 24px; }
  .mtop { display: flex; align-items: center; gap: 10px; }
  .mtop b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .head { flex-direction: column; align-items: stretch; gap: 14px; }
  .head .acts { width: 100%; }
  .banner { flex-wrap: wrap; } .banner .grow { flex-basis: calc(100% - 100px); } .banner .btn { order: 3; width: 100%; }
  .split { grid-template-columns: minmax(0, 1fr); }
  #det.panel { display: none; }
  .listcol .seg { width: 100%; }
  table.t.cards tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  table.t.cards td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; }
  table.t.cards td:nth-child(4) { grid-column: 2; grid-row: 1; }
  table.t.cards td:nth-child(5) { grid-column: 2; grid-row: 2; justify-self: end; }
  table.t.cards td:first-child { grid-column: 1; grid-row: 1; }
}

/* F1-d document view */
.split.docv { grid-template-columns: minmax(0, 1fr) 340px; }
.prevwrap { border-radius: 24px; padding: 20px 24px 28px; }
.prevh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin: 4px 0 18px; }
.prevh span { display: inline-flex; gap: 8px; align-items: center; }
.prevh .icon { width: 16px; height: 16px; }
.paper { max-width: 100%; box-shadow: 0 2px 16px rgba(10,10,11,.06); border-radius: 4px; }
#side2.stack > * + * { margin-top: 16px; }
.panel.dark.stc { position: static; gap: 14px; }
.panel.dark.stc .dh { justify-content: space-between; }
.panel.dark.stc .dh .lbl { margin: 0; }
.panel.dark.stc .big { font-size: 44px; }
.panel.dark .kvs .kv:last-child { border-bottom: 0; }
.panel.dark .kv span.red, .panel.dark .kv span.green, .panel.dark .kv span.amber { color: #fff; }
.box h2 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.box.soft { background: var(--panel); border-color: var(--panel); }
.box.soft .small.muted { margin: -6px 0 16px; line-height: 1.55; }
.box .stack > .btn.block + .btn.block { margin-top: 10px; }
.box .btn.block { height: 44px; }
.box.soft .btn.block:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.box.soft .btn.danger { color: var(--red); }
.timeline div { padding: 8px 0; gap: 12px; }
.timeline div::before { width: 7px; height: 7px; background: var(--faint); margin-top: 7px; }
.timeline div.hot::before { background: var(--red); }
.timeline b { display: block; font-weight: 500; font-size: 14px; }
.timeline time { display: block; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.head h1 .pill { font-size: 12px; font-weight: 600; letter-spacing: 0; }
@media (max-width: 1180px) { .split.docv { grid-template-columns: 1fr; } }

/* F2 editor */
.head.edh { align-items: center; }
.head.edh .back { width: 40px; height: 40px; border-radius: 50%; flex: none; align-self: center; }
.head.edh .t { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head.edh h1 { font-size: 32px; }
.head.edh #saved { margin-right: 6px; white-space: nowrap; }
.ed { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.ed > div:first-child > * + * { margin-top: 16px; }
#cbox.has { background: var(--panel); border-color: var(--panel); }
.clientcard { align-items: center; gap: 14px; }
.clientcard .av { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.clientcard .cn { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clientcard .cn .pill { background: #fff; color: var(--ink); font-size: 11px; }
.clientcard .small.muted { line-height: 1.6; margin-top: 2px; }
.clientcard .iconbtn { border: 0; background: transparent; color: var(--faint); }
.cmailrow { display: flex; align-items: flex-end; gap: 16px; margin-top: 16px; }
.cmailrow .in { background: #fff; height: 48px; border-radius: 14px; }
.cmailrow .check { height: 48px; white-space: nowrap; font-weight: 500; }
.check input { accent-color: var(--ink); }
table.lines th { color: var(--faint); border-bottom: 1px solid var(--line); padding: 10px 6px; }
table.lines td { padding: 4px 0; border-bottom: 1px solid var(--line); }
table.lines .in { border-color: transparent; background: transparent; height: 42px; padding: 0 6px; border-radius: 10px; }
table.lines .in:hover { background: var(--panel); }
table.lines .in:focus { border-color: var(--ink); background: #fff; box-shadow: none; }
table.lines select.in { padding-right: 24px; background-position: right 4px center; }
table.lines td.c-s { padding-right: 6px; }
table.lines tr:focus-within td { background: var(--panel); }
table.lines tr:focus-within td:first-child { border-radius: 14px 0 0 14px; } table.lines tr:focus-within td:last-child { border-radius: 0 14px 14px 0; }
#addl { background: var(--panel); }
.edside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.edset { background: var(--panel); border-radius: 24px; padding: 20px; }
.edset .seg { background: transparent; padding: 0; }
.edset .seg button.on { background: #fff; }
.edset .kv { border: 0; padding: 6px 0; }
.edset .kv > span:first-child { color: var(--muted); }
.edset .in { background-color: #fff; border-color: #fff; height: 48px; border-radius: 14px; }
.edset label.f > span { color: var(--ink); font-weight: 500; }
.edtot { background: var(--ink2); color: #fff; border-radius: 24px; padding: 24px; }
.edtot .kv { color: var(--faint); font-size: 13px; } .edtot .kv > span:last-child { color: #fff; font-weight: 500; }
.edtot .tot { border-top: 1px solid #2A2E33; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 18px; margin-top: 14px; font-weight: 400; font-size: 13px; color: var(--faint); }
.edtot .tot span:last-child { font-size: 40px; font-weight: 500; color: #fff; letter-spacing: -0.02em; }
.edhint { margin: 0 4px; line-height: 1.5; }
.drop { border-radius: 18px; padding: 8px; box-shadow: 0 16px 40px rgba(10,10,11,.12); }
.drop .o { border-radius: 12px; padding: 10px 12px; }
.drop .h { color: var(--faint); }
@media (max-width: 1180px) { .ed { grid-template-columns: 1fr; } .edside { position: static; } }
@media (max-width: 860px) { .head.edh .acts { justify-content: flex-start; flex-wrap: wrap; } .head.edh #saved { width: 100%; } .cmailrow { flex-direction: column; align-items: stretch; gap: 8px; } }
table.lines .c-q { width: 52px; } table.lines .c-u { width: 72px; } table.lines .c-p { width: 92px; } table.lines .c-v { width: 72px; } table.lines .c-d { width: 52px; } table.lines .c-s { width: 92px; } table.lines .c-x { width: 32px; }
.edtot .tot span:last-child i { font-style: normal; font-size: 20px; color: var(--faint); margin-left: 6px; }

/* F0 first run */
.hero1 { display: flex; align-items: center; gap: 24px; background: var(--ink); color: #fff; border-radius: 28px; padding: 36px 48px; margin-bottom: 24px; }
.hero1 .chip { display: inline-block; background: #2A2E33; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; }
.hero1 h2 { font-size: 34px; line-height: 1.15; font-weight: 600; margin: 14px 0 12px; letter-spacing: -0.02em; max-width: 560px; }
.hero1 p { color: var(--faint); font-size: 15px; margin: 0 0 22px; max-width: 520px; }
.hero1 .row { gap: 10px; }
.hero1 .btn { background: #fff; color: var(--ink); border-color: #fff; height: 48px; }
.hero1 .btn.ghostd { background: transparent; color: #fff; border-color: #3A3F45; }
.hero1 img { width: 180px; height: auto; flex: none; margin-right: 24px; }
.fsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.fstep { background: var(--panel); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fstep.done { background: #fff; border: 1px solid var(--line); }
.fstep .tag { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.fstep .tag .icon { width: 16px; height: 16px; }
.fstep b { font-size: 16px; font-weight: 600; }
.fstep span { font-size: 13px; color: var(--muted); }
.fstep .btn { margin-top: 8px; background: #fff; }
@media (max-width: 1100px) { .hero1 img { display: none; } .hero1 { padding: 28px; } }
@media (max-width: 860px) { .fsteps { grid-template-columns: 1fr; } .hero1 h2 { font-size: 26px; } }

/* F0-b import */
.imp-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.imp-grid > .stack > .box + .box { margin-top: 16px; }
.imp-sec { padding: 22px 22px 18px; }
.imp-h { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.imp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.imp-tile { flex-direction: column; align-items: flex-start; border: 0; background: var(--panel); border-radius: 14px; padding: 12px 14px; min-height: 64px; }
.imp-tile i { display: none; }
.imp-tile b { font-size: 13px; } .imp-tile small { font-size: 11px; line-height: 1.4; }
.imp-tile.on { background: var(--ink); color: #fff; border: 0; } .imp-tile.on small { color: var(--faint); }
.imp-list .imp-what { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 4px; align-items: center; gap: 16px; }
.imp-list .imp-what:last-child { border-bottom: 0; }
.imp-what input { width: 20px; height: 20px; }
.imp-side { background: var(--ink2); color: #fff; border: 0; border-radius: 24px; padding: 22px; position: sticky; top: 20px; }
.imp-side .chip { display: inline-block; background: #2A2E33; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600; margin-bottom: 12px; }
.imp-side h2 { font-size: 18px; line-height: 1.3; margin-bottom: 16px; }
.imp-help { display: flex; flex-direction: column; gap: 10px; }
.imp-help > div { background: #1F2226; border-radius: 14px; padding: 14px; }
.imp-help b { display: block; font-size: 13px; margin-bottom: 4px; }
.imp-help span { display: block; font-size: 12px; color: var(--faint); line-height: 1.5; }
.imp-side .imp-drop { background: transparent; border-color: #3A3F45; color: #fff; border-radius: 14px; }
.imp-side .imp-drop small, .imp-side .imp-drop .icon { color: var(--faint); }
.imp-side .imp-drop.over { background: #1F2226; border-color: #fff; }
.imp-side .imp-file { background: #1F2226; border-color: #2A2E33; }
.imp-side .imp-file .muted, .imp-side .small.muted { color: var(--faint); }
.imp-side .imp-file .iconbtn { background: transparent; color: var(--faint); }
.imp-side .btn.primary { background: #fff; border-color: #fff; color: var(--ink); }
.imp-side .btn.primary:disabled { background: #2A2E33; border-color: #2A2E33; color: var(--faint); }
@media (max-width: 1280px) { .imp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .imp-side { position: static; } }

/* K1 clients panel */
.cpanel { background: var(--panel); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.cpanel:empty { display: none; }
.cpanel .ch { display: flex; gap: 12px; align-items: flex-start; }
.cpanel .ch .av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.cpanel .ch strong { display: block; font-size: 16px; font-weight: 600; }
.cpanel .ch small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cpanel .cst { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cpanel .cst > div { background: #fff; border-radius: 16px; padding: 14px; }
.cpanel .cst > div.ink { background: var(--ink2); color: #fff; }
.cpanel .cst small { display: block; font-size: 11px; color: var(--muted); } .cpanel .cst .ink small { color: var(--faint); }
.cpanel .cst b { display: block; font-size: 20px; font-weight: 600; margin-top: 4px; white-space: nowrap; }
.cpanel .kv { font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cpanel .lbl { font-size: 11px; font-weight: 600; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.cpanel .cdocs { display: flex; flex-direction: column; gap: 8px; margin-top: -6px; }
.cpanel .cdocs a { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.cpanel .cdocs b { display: block; font-size: 13px; font-weight: 600; } .cpanel .cdocs small { display: block; font-size: 12px; color: var(--muted); }
.cpanel .cbtns { display: flex; gap: 8px; } .cpanel .cbtns .btn { flex: 1; }
.cpanel .cbtns .btn:not(.primary) { background: #fff; }

/* AR1 items */
.infob { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 18px; padding: 16px 18px; margin-bottom: 20px; }
.infob .icon { width: 18px; height: 18px; flex: none; }
.infob b { display: block; font-size: 14px; font-weight: 600; } .infob span { display: block; font-size: 13px; color: var(--muted); }
.use { display: inline-block; vertical-align: middle; width: 64px; height: 5px; border-radius: 3px; background: var(--line); margin-right: 10px; overflow: hidden; }
.use i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }

/* R1 reports */
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.cards4 .sc { min-height: 0; gap: 6px; padding: 18px 20px; }
.cards4 .sc .l { font-size: 12px; }
.cards4 .sc .v { font-size: 26px; }
.cards4 .sc .s { font-size: 12px; color: var(--muted); } .cards4 .sc.ink .s { color: var(--faint); }
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.rgrid .box { margin: 0; }
.box.chart .bars { height: 210px; gap: 10px; padding-top: 24px; }
.box.chart .bars i { background: var(--line); max-width: 56px; border-radius: 10px 10px 4px 4px; }
.box.chart .bars .max i { background: #5B6168; } .box.chart .bars .cur i { background: var(--ink); }
.box.chart .bars .v { font-size: 11px; font-weight: 600; color: var(--ink); min-height: 14px; }
.box.chart .bars .cur > span:last-child { color: var(--ink); font-weight: 600; }
.bestc { margin-bottom: 16px; font-size: 13px; } .bestc .row { margin-bottom: 8px; }
.bestc .bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bestc .bar i { display: block; height: 100%; background: var(--ink); }
@media (max-width: 1180px) { .cards4 { grid-template-columns: 1fr 1fr; } .rgrid { grid-template-columns: 1fr; } .cpanel { position: static; } }
@media (max-width: 860px) { .cards4 { grid-template-columns: 1fr; } .head .acts .seg { order: 2; } }
.cpanel .cst b { font-size: 18px; }

/* S1–S7 settings */
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fgrid .span2 { grid-column: span 2; } .fgrid .span3 { grid-column: 1 / -1; }
.fgrid label.f > span { font-size: 12px; color: var(--muted); }
.fgrid label.f > span small { color: var(--faint); margin-left: 4px; }
.fgrid .in { height: 48px; border-radius: 14px; }
.fgrid .in[readonly] { background: var(--panel); border-color: var(--panel); }
.box > .row.between > h2 { margin: 0 0 16px; }
.setrow { padding: 18px 0; border-bottom: 1px solid var(--line); }
.setrow .c .in { height: 44px; border-radius: 14px; }
.setrow .l b { font-size: 14px; }
#blist { display: flex; flex-direction: column; gap: 10px; }
.bankrow { display: flex; align-items: center; gap: 14px; background: var(--panel); border-radius: 18px; padding: 14px 16px; }
.bankrow .av { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 600; flex: none; }
.bankrow .small.muted { font-size: 11px; }
.bankrow .pill { background: #fff; color: var(--ink); }
.bankrow .btn.sm { height: 34px; background: #fff; }
.bankrow .iconbtn { border: 0; background: transparent; color: var(--muted); }
.bankrow.def { background: var(--ink); color: #fff; }
.bankrow.def .av { background: #2A2E33; color: #fff; }
.bankrow.def .small.muted { color: var(--faint); }
.bankrow.def .pill { background: #2A2E33; color: #fff; } .bankrow.def .pill.on { background: #fff; color: var(--ink); }
.bankrow.def .iconbtn { color: var(--faint); }
.btn.cashon { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 860px) { .fgrid { grid-template-columns: 1fr; } .fgrid .span2 { grid-column: auto; } .bankrow { flex-wrap: wrap; } }
@media (max-width: 860px) {
  .head.edh { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .head.edh .t { flex: 1 1 200px; }
  .head.edh .acts { flex-basis: 100%; }
  .head.edh h1 { font-size: 26px; }
  table.lines .in { background: var(--panel); }
  table.lines tr { gap: 8px; }
  .bankrow .grow { flex: 1 1 180px; }
  .bankrow .small.muted { word-break: break-word; }
}
.panel.dark .btn.ghost.danger { color: #FF8A8E; }
.head.edh h1 { white-space: nowrap; } .head.edh .t { min-width: 0; }
/* F0-c import check: warnings vs info, readable "how" card */
.imp-how { background: var(--panel); border-color: var(--panel); }
.imp-how b { color: var(--ink); }
.imp-note { margin: -8px 0 12px; }
.imp-warn { align-items: flex-start; gap: 12px; border-radius: 14px; background: var(--panel); padding: 14px 16px; }
.imp-warn > .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.imp-warn.warn { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.imp-warn.warn > .icon { color: var(--ink); }
.imp-warn b { font-size: 14px; } .imp-warn .small { color: var(--muted); margin-top: 3px; }

/* Responsive v3: list + detail */
.box.tbl { overflow-x: auto; }
table.t td.cl { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t .rtag { font-size: 11px; font-weight: 500; color: var(--faint); margin-top: 2px; letter-spacing: .01em; }
.head .sub.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .l { white-space: nowrap; min-width: 0; }
.sc .l > span, .sc .l { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1680px) { .split table.t .hm { display: none; } }
@media (max-width: 1480px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .panel, .split > #det { display: none; }
}
@media (max-width: 1200px) {
  .cards3 { gap: 12px; } .cards3 .sc { padding: 18px; min-height: 0; } .cards3 .sc .v { font-size: 24px; }
  .head { flex-wrap: wrap; }
  .head .acts { flex: 1 1 100%; justify-content: flex-start; }
  .head .acts .search { flex: 1; max-width: 420px; }
}
@media (min-width: 1201px) and (max-width: 1480px) { .split table.t .hm { display: table-cell; } }
table.t td.num, table.t td.r { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1200px) {
  .shell { grid-template-columns: 72px 200px minmax(0, 1fr); }
  .side { padding: 20px 10px; }
  .xsell { display: none; }
  table.t .hm { display: none; }
  .sc .l { white-space: normal; line-height: 1.25; }
}
.imp-last { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; background: var(--panel); border: 0; border-radius: 20px; padding: 18px 22px; }
.imp-last b { display: block; font-size: 15px; margin-bottom: 4px; }
.imp-last span { font-size: 13px; }
@media (max-width: 860px) { .imp-last { flex-direction: column; align-items: stretch; } }
.drop.wide .o { align-items: center; }
.drop.wide .o > div { min-width: 0; }
.drop.wide .o b { font-weight: 600; }
.drop.wide .o .num { white-space: nowrap; font-size: 14px; color: var(--ink); font-weight: 600; }

/* Installable app */
.pwa { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 12px 12px 12px 14px; box-shadow: 0 16px 40px rgba(10,10,11,.14); }
.pwa img { border-radius: 11px; flex: none; }
.pwa b { display: block; font-size: 14px; font-weight: 600; }
.pwa span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.pwa .iconbtn { border: 0; background: transparent; width: 28px; height: 28px; flex: none; }
.pwa .btn { flex: none; }
.pwa-steps { padding-left: 20px; margin: 8px 0 16px; display: grid; gap: 10px; }
.pwa-steps .icon { width: 16px; height: 16px; vertical-align: -3px; }
.pwa-box { display: flex; align-items: center; gap: 16px; }
.pwa-box img { border-radius: 14px; flex: none; }
@media (max-width: 860px) { .pwa-box { flex-wrap: wrap; } }
@media (display-mode: standalone) { .pwa { display: none; } }
@media (max-width: 860px) {
  .brandside { padding: calc(18px + env(safe-area-inset-top)) 20px 18px; gap: 10px; }
  .brandside .tag { display: block; }
  .brandside .tag .mark.big { display: none; }
  .brandside h2 { font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
}
.ios-steps { display: grid; gap: 10px; margin: 6px 0 14px; }
.ios-step { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 16px; padding: 12px 14px; }
.ios-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.ios-step b { display: block; font-size: 14px; font-weight: 600; }
.ios-step small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ios-share { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #0A84FF; flex: none; }
.ios-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 10px; padding: 9px 12px; margin-top: 8px; font-size: 13px; }
.ios-row span { order: -1; }
.ios-bar { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 13px; color: #0A84FF; }
.ios-bar .ios-app { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.ios-bar .ios-app img { border-radius: 6px; }
.ios-bar .add { font-weight: 600; background: #0A84FF; color: #fff; border-radius: 999px; padding: 3px 10px; animation: iosPulse 1.6s ease-in-out infinite; }
.ios-pointer { position: fixed; left: 50%; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #0A84FF; pointer-events: none; transform: translateX(-50%); }
.ios-pointer > svg { width: 30px; height: 30px; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 6px 20px rgba(10,10,11,.18); }
.ios-pointer i { width: 3px; height: 34px; background: #0A84FF; border-radius: 3px; position: relative; }
.ios-pointer i::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 8px solid transparent; }
.ios-pointer.bottom { bottom: calc(6px + env(safe-area-inset-bottom)); animation: iosBounceDown 1.2s ease-in-out infinite; }
.ios-pointer.bottom i::after { top: 100%; border-top-color: #0A84FF; border-bottom: 0; }
.ios-pointer.top { top: calc(4px + env(safe-area-inset-top)); left: auto; right: 62px; transform: none; flex-direction: column-reverse; animation: iosBounceUp 1.2s ease-in-out infinite; }
.ios-pointer.top i::after { bottom: 100%; border-bottom-color: #0A84FF; border-top: 0; }
@keyframes iosBounceDown { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
@keyframes iosBounceUp { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes iosPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10,132,255,.45); } 50% { box-shadow: 0 0 0 6px rgba(10,132,255,0); } }
.pwa-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.pwa-qr img { border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.pwa-qr small { font-size: 11px; color: var(--muted); max-width: 140px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ios-pointer, .ios-bar .add { animation: none; } }
/* Mobile auth: form first, brand banner at the bottom */
@media (max-width: 860px) {
  .auth { min-height: 100vh; min-height: 100dvh; grid-template-rows: 1fr auto; }
  .auth .formside { order: 1; padding-top: calc(32px + env(safe-area-inset-top)); }
  .auth .brandside { order: 2; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); gap: 16px; }
  .brandside .tag { display: flex; align-items: center; gap: 14px; margin: 0; }
  .brandside .tag .mark.big { display: block; width: 66px; height: 56px; color: #fff; flex: none; }
  .brandside h2 { font-size: 22px; font-weight: 400; line-height: 1.35; letter-spacing: -0.01em; }
  .brandside h2 span { display: block; }
}
/* Code entry: always six equal boxes that fit the width */
.codebox { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
.codebox input { width: 100%; min-width: 0; padding: 0; height: 60px; text-align: center; font-size: 24px; }
.card-auth .lead { overflow-wrap: anywhere; }
@media (max-width: 860px) { .codebox { gap: 8px; } .codebox input { height: 54px; font-size: 22px; } }
.brandside h2 span { display: block; }
/* Brand side v3: promo block (3D cat + slogan) */
.brandpromo { margin-top: auto; display: flex; flex-direction: column; }
.brandpromo .catcard { margin-top: 0; }
@media (max-width: 860px) {
  .auth { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .auth .brandside { display: contents; }
  .auth .brandbar { order: 0; background: var(--ink2); color: #fff; padding: calc(18px + env(safe-area-inset-top)) 20px 18px; }
  .auth .formside { order: 1; flex: 1; padding-top: 32px; }
  .auth .brandpromo { order: 2; margin: 0 20px calc(20px + env(safe-area-inset-bottom)); background: var(--panel); border-radius: 24px; padding: 14px 20px 14px 10px; flex-direction: row; align-items: center; gap: 12px; color: var(--ink); }
  .auth .brandpromo .catcard { display: block; width: 110px; flex: none; background: transparent; aspect-ratio: 1; max-height: none; border-radius: 0; }
  .auth .brandpromo .catcard img { width: 100%; }
  .auth .brandpromo .tag { margin: 0; display: block; }
  .auth .brandpromo h2 { font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); }
  .auth .brandpromo h2 span { color: var(--muted); display: block; }
  .auth .brandpromo p { display: none; }
}
.toast { border-radius: 18px; text-align: left; }
.pwa.onauth { bottom: calc(14px + env(safe-area-inset-bottom)); }
/* iPhone zooms into any field with text under 16px – keep fields at 16px on phones */
@media (max-width: 860px) { input, select, textarea, .in, .card-auth .in, .onb .in, .formside .in { font-size: 16px !important; } .codebox input { font-size: 22px !important; } }
.pwa.onauth { position: static; order: 2; margin: 0 20px 12px; box-shadow: 0 8px 24px rgba(10,10,11,.08); }
@media (max-width: 860px) { .auth .brandpromo { order: 3; } }
.pwa.typing { display: none; }
.pager { display: flex; align-items: center; gap: 10px; padding: 14px 6px 10px; border-top: 1px solid var(--line); }
.pager .iconbtn { width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: #fff; border: 0; font-size: 18px; font-weight: 600; }
.pager .iconbtn:disabled { background: var(--panel); color: var(--faint); cursor: default; }
@media (max-width: 860px) { .auth .brandbar { display: flex; justify-content: center; padding-left: 20px; padding-right: 20px; } }

/* Visual language v2 (22.11.2026): cool palette, cat renders in brand cards */
.bcard { position: relative; border-radius: 20px; overflow: hidden; background: #E1E5E9 var(--img) center / cover no-repeat; color: var(--ink); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bcard b { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; max-width: 16ch; position: relative; }
.bcard span { font-size: 13px; color: var(--muted); max-width: 30ch; position: relative; }
.bcard.r45 { aspect-ratio: 4 / 5; }
.bcard.r11 { aspect-ratio: 1; }
/* Wide cards: text area left on Frost, image right with a fade, so the title never sits on the cat */
.bcard.r32, .bcard.r169 { background: #DFE2E6; justify-content: center; padding: 24px 28px; }
.bcard.r32::after, .bcard.r169::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; aspect-ratio: 1200 / 1490; background: var(--img) center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.bcard.wide { aspect-ratio: auto; max-height: none; min-height: 200px; }
.bcard.r32 > *, .bcard.r169 > * { z-index: 1; }
.bcard.r32 { aspect-ratio: 3 / 1.15; max-height: 240px; }
.bcard.r169 { aspect-ratio: 16 / 7; max-height: 260px; }
.bcard.r32 b, .bcard.r169 b, .bcard.r32 span, .bcard.r169 span { max-width: min(30ch, 52%); }
.bcard.num { background: var(--ink2); color: #fff; justify-content: space-between; }
.bcard.num i { font-style: normal; font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.bcard.num span { color: var(--faint); }
.bempty { margin-top: 12px; }
.bempty .bcard.r169 { aspect-ratio: auto; min-height: 200px; }
/* F0 hero: graphite surface, envelope card */
.hero1 { background: var(--ink2); padding: 32px 32px 32px 48px; }
.hero1 .chip { background: #2A2E33; }
.hero1 .bcard.hero { width: 220px; flex: none; }
/* Login brand side: full-bleed cat on the stack, dark text over a soft fade */
.brandside { background: linear-gradient(180deg, #C1C9CD, #CACCD0); color: var(--ink); position: sticky; overflow: hidden; }
.brandside::before { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, calc((100vh - 300px) * .805)); aspect-ratio: 1200 / 1490; pointer-events: none;
  background: url(/app/static/cat-stack.webp) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 16%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0, #000 16%); mask-composite: intersect; }
.brandside > * { position: relative; }
.brandside .lockup { color: var(--ink); }
.brandside .brandpromo { margin-top: 32px; }
.brandside .catcard { display: none; }
.brandside .tag { margin-top: 0; }
.brandside h2 span { color: var(--muted); }
.brandside p { color: var(--muted); }
@media (max-width: 860px) {
  .brandside { background: none; }
  .brandside::before { display: none; }
  .auth .brandbar .lockup { color: #fff; }
  .auth .brandpromo .catcard { display: block; width: 96px; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; }
  .auth .brandpromo .catcard img { width: 100%; height: 100%; object-fit: cover; }
  .hero1 { flex-direction: column; align-items: stretch; padding: 24px; }
  .hero1 .bcard.hero { width: 100%; aspect-ratio: 4 / 3; background-position: center 75%; }
  .bempty { grid-template-columns: 1fr; }
  .bcard.r32, .bcard.r169 { aspect-ratio: auto; min-height: 180px; }
}

/* Visual language v2 · depth: large dark surfaces are graphite with a soft gradient, a faint edge and a shadow */
.sc.ink, .panel.dark, .edtot, .imp-side, .hero1, .banner, .bcard.num, .cpanel .cst > div.ink {
  background: linear-gradient(135deg, #2E3238 0%, #1F2226 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 12px 32px rgba(31,34,38,.16); }
/* Dashboard micro-graphics (real data): paid per day this month, overdue share of unpaid */
.sc .spark { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin-top: auto; }
.sc .spark i { width: 3px; min-height: 3px; border-radius: 2px; background: #C9CED4; }
.sc .spark i.on { background: var(--ink); }
.sc.ink .spark i { background: rgba(255,255,255,.22); }
.sc.ink .spark i.on { background: #fff; }
.sc .sharebar { height: 4px; border-radius: 2px; background: #D6DADF; margin-top: auto; overflow: hidden; }
.sc .sharebar i { display: block; height: 100%; background: var(--red); border-radius: 2px; }

/* v2 · light depth — matches Figma (white cards, soft shadow, no borders) */
:root { --shc: 0 14px 36px rgba(31,34,38,.07), 0 2px 6px rgba(31,34,38,.04); --shc-h: 0 18px 44px rgba(31,34,38,.10), 0 3px 8px rgba(31,34,38,.05); }
.box, .panel, .found, .todo a, .sc, .fstep, .fstep.done, .cpanel, .edset, .infob, .bankrow, .imp-tile, .imp-what, .imp-last, .xsell, .orgpick button, .box.soft, #cbox.has, .imp-how, .ios-step {
  background: #fff; border: 0; box-shadow: var(--shc); }
.todo a:hover, .orgpick button:hover, .imp-tile:hover, .imp-what:hover, .xsell:hover { background: #fff; box-shadow: var(--shc-h); }
.imp-tile.on { border: 0; box-shadow: inset 0 0 0 1.5px var(--ink), var(--shc); }
.orgpick button > b { background: var(--panel); }
@media (max-width: 860px) { .auth .brandpromo { background: #fff; box-shadow: var(--shc); } }

/* v2 · phone navigation — Figma 08 (company switcher, floating pill nav, round +, sheets) */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,11,0); transition: background .2s; }
.sheet-bg.shown { background: rgba(10,10,11,.32); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
.sheet-bg.shown .sheet { transform: none; }
.sheet .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: #D6DADF; margin: 0 auto 14px; }
.sheet h2 { font-size: 20px; margin: 4px 0 14px; }
.sheet .sorg, .sheet .orow { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; padding: 12px 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.sheet .sorg { background: var(--panel); margin-bottom: 6px; }
.sheet .sorg > i, .sheet .orow > i, .sheet .mechip > i { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink2); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 600; }
.sheet .sorg span, .sheet .orow span { flex: 1; min-width: 0; } .sheet .sorg span b, .sheet .orow span b { display: block; font-size: 15px; font-weight: 600; }
.sheet .sorg small, .sheet .orow small { color: var(--muted); font-size: 12px; } .sheet .sorg > b { color: var(--faint); }
.sheet .srow { display: flex; align-items: center; gap: 16px; padding: 17px 8px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500; }
.sheet .srow .icon { width: 20px; height: 20px; } .sheet .srow span { flex: 1; } .sheet .srow em { font-style: normal; color: var(--faint); font-size: 13px; } .sheet .srow > b { color: var(--faint); font-weight: 400; }
.sheet .sfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 12px; }
.sheet .mechip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 999px; padding: 5px 12px 5px 5px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.sheet .mechip > i { width: 26px; height: 26px; font-size: 10px; } .sheet .mechip b { color: var(--faint); font-weight: 400; }
.sheet .shelp { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: underline; }
.sheet .olist { display: flex; flex-direction: column; gap: 10px; }
.sheet .orow { background: #fff; box-shadow: var(--shc); padding: 14px; }
.sheet .orow.on { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sheet .orow > i { width: 40px; height: 40px; } .sheet .orow > .icon { width: 22px; height: 22px; }
.sheet .oadd { display: inline-block; margin: 16px 4px 4px; color: var(--ink); font-weight: 600; text-decoration: none; }
.setlist .nav { display: flex; flex-direction: column; } .setlist .nav .sec { margin: 14px 0 4px; }
@media (max-width: 860px) {
  .mtop { justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 0; background: rgba(248,249,250,.5); -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px); }
  .mco { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent; padding: 4px 0; font: inherit; color: var(--ink); cursor: pointer; }
  .mco > i { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink2); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 600; }
  .mco > b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mco .cv { color: var(--muted); font-size: 14px; margin-top: -6px; }
  .msrch { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--ink); cursor: pointer; }
  .msrch .icon { width: 20px; height: 20px; }
  .main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .mobilebar { display: flex; align-items: center; gap: 12px; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); background: transparent; padding: 0; }
  .mobilebar .mpill { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.5); -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px); box-shadow: var(--shc), inset 0 0 0 1px rgba(31,34,38,.06); }
  .mobilebar .mpill a, .mobilebar .mpill button { flex: none; height: 48px; min-width: 48px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
  .mobilebar .mpill span { display: none; }
  .mobilebar .mpill .on { background: var(--ink); color: #fff; padding: 0 18px 0 16px; }
  .mobilebar .mpill .on span { display: inline; } .mobilebar .mpill .on .icon { color: #fff; }
  .mobilebar .mpill .icon { width: 20px; height: 20px; }
  .mobilebar .mfab { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(10,10,11,.28); }
  .mobilebar .mfab .icon { width: 24px; height: 24px; color: #fff; }
  .shell[data-sec="invoices"]:not(.sopen) #sf { display: none; }
}
@media (max-width: 860px) { .pwa { bottom: calc(88px + env(safe-area-inset-bottom)); } }

/* v2 · motion — smooth but mechanical: one crisp curve, no bounce, quick press feedback */
:root { --mech: cubic-bezier(.25, .1, .1, 1); --t-move: 420ms; --t-press: 140ms; }
.sheet-bg { transition: background var(--t-move) var(--mech); }
.sheet { transition: transform var(--t-move) var(--mech); touch-action: pan-x; will-change: transform; }
.sheet .grab { cursor: grab; }
.sheet .srow, .sheet .sorg, .sheet .orow, .sheet .mechip { transition: transform var(--t-press) var(--mech), background var(--t-press) linear; }
.sheet .srow:active { background: var(--panel); border-radius: 14px; transform: scale(.985); }
.sheet .sorg:active, .sheet .orow:active, .sheet .mechip:active { transform: scale(.975); }
@media (max-width: 860px) {
  .mobilebar .mpill { position: relative; }
  .mobilebar .mpill .mind { position: absolute; left: 0; top: 6px; height: 48px; width: 48px; border-radius: 999px; background: var(--ink); opacity: 0; transition: transform var(--t-move) var(--mech), width var(--t-move) var(--mech), opacity 120ms linear; pointer-events: none; }
  .mobilebar .mpill a, .mobilebar .mpill button { position: relative; z-index: 1; transition: transform var(--t-press) var(--mech), color 160ms linear; }
  .mobilebar .mpill .on { background: transparent; }
  .mobilebar .mpill .on span { animation: lblIn 320ms var(--mech) 120ms both; }
  .mobilebar .mpill a:active, .mobilebar .mpill button:active { transform: scale(.92); }
  .mobilebar .mfab { transition: transform var(--t-press) var(--mech), box-shadow var(--t-press) linear; }
  .mobilebar .mfab:active { transform: scale(.92); box-shadow: 0 6px 14px rgba(10,10,11,.24); }
  .mco, .msrch { transition: transform var(--t-press) var(--mech); } .mco:active, .msrch:active { transform: scale(.96); }
  .shell[data-sec="invoices"].sopen #sf { animation: lblIn 220ms var(--mech) both; }
}
@keyframes lblIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-bg, .mobilebar .mpill .mind { transition: none !important; }
  .mobilebar .mpill .on span, .shell[data-sec="invoices"].sopen #sf { animation: none !important; }
}

/* v2 · reports — no sideways scroll, graphite + white cards with micro-graphics, scrollable period chips */
.rgrid { grid-template-columns: minmax(0, 1fr) 320px; }
.box.chart .bars div { position: relative; }
.box.chart .bars .v { width: 0; display: flex; justify-content: center; overflow: visible; white-space: nowrap; }
.box.chart .bars div:last-child .v { align-self: flex-end; justify-content: flex-end; }
.box.chart .bars div:first-child .v { align-self: flex-start; justify-content: flex-start; }
.cards4 .sc .spark, .cards4 .sc .sharebar { margin-top: 10px; }
.bestc .row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 12px; }
.bestc .row > b { flex: none; }
@media (max-width: 1180px) { .rgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .cards4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cards4 .sc { padding: 16px; border-radius: 20px; }
  .cards4 .sc .v { font-size: 20px; } .cards4 .sc .l, .cards4 .sc .s { font-size: 11.5px; }
  .seg.rseg { display: flex; max-width: none; width: calc(100% + 32px); margin: 0 -16px; padding: 2px 16px; gap: 8px; background: transparent; overflow-x: auto; scrollbar-width: none; }
  .seg.rseg::-webkit-scrollbar { display: none; }
  .seg.rseg button { flex: none; height: 38px; padding: 0 16px; background: var(--panel); color: var(--ink); white-space: nowrap; font-weight: 500; transition: background var(--t-press) linear, color var(--t-press) linear; }
  .seg.rseg button.on { background: var(--ink); color: #fff; }
  .box.chart .bars { gap: 5px; height: 190px; } .box.chart .bars i { border-radius: 8px 8px 3px 3px; }
  .box.chart .bars span { font-size: 10px; } .box.chart .bars .v { font-size: 10px; }
  .rgrid { gap: 12px; } .head .acts .btn.primary { width: 100%; }
}

/* v2 · invoice lines on phone — one clean block per line: labelled fields, no underlines */
@media (max-width: 860px) {
  table.lines, table.lines tbody { display: block; }
  table.lines tr { position: relative; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 18px 0; border-bottom: 1px solid var(--line2); }
  table.lines tr:first-child { padding-top: 4px; }
  table.lines tr:last-child { border-bottom: 0; }
  table.lines td, table.lines tr:focus-within td { border: 0 !important; padding: 0; background: transparent !important; border-radius: 0 !important; }
  table.lines td::before { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px 2px; }
  table.lines td.c-n { grid-column: 1 / -1; grid-row: 1; } table.lines td.c-n::before { content: 'Описание'; }
  table.lines td.c-q::before { content: 'Количество'; } table.lines td.c-u::before { content: 'Мярка'; } table.lines td.c-p::before { content: 'Ед. цена'; }
  table.lines td.c-v::before { content: 'ДДС'; } table.lines td.c-d::before { content: 'Отстъпка %'; }
  table.lines td.c-s { grid-column: 3; align-self: end; text-align: right; font-size: 17px; font-weight: 600; padding-bottom: 12px; }
  table.lines td.c-s::before { content: 'Сума'; text-align: right; font-weight: 400; margin-right: 0; }
  table.lines td.c-x { position: absolute; top: 14px; right: 0; grid-column: auto; grid-row: auto; }
  table.lines tr:first-child td.c-x { top: 0; }
  table.lines td.c-x .iconbtn { width: 28px; height: 28px; background: transparent; color: var(--faint); }
  table.lines .in, table.lines select.in { height: 48px; padding: 0 14px; border: 1px solid transparent; border-radius: 14px; background: var(--panel); }
  table.lines .in:focus { border-color: var(--ink); background: #fff; }
  #addl + .small.faint { display: none; }
}

/* v2 · page slide between tabs — ease-out with a snap, matched by the pill */
html.sliding, html.sliding body { overflow-x: hidden; }
html.sliding .main { position: relative; z-index: 6; min-height: 100vh; background: var(--bg, #F8F9FA); box-shadow: -12px 0 32px rgba(31,34,38,.06); }
@media (max-width: 860px) {
  .mobilebar .mpill .mind { transition: transform 500ms cubic-bezier(.22, 1, .36, 1), width 500ms cubic-bezier(.22, 1, .36, 1), opacity 120ms linear; }
}

/* v2 · glass pass (phone) — saturation, specular rim, scroll-edge fade, denser when content scrolls under */
@media (max-width: 860px) {
  .mtop, .mobilebar .mpill { -webkit-backdrop-filter: blur(25px) saturate(180%); backdrop-filter: blur(25px) saturate(180%); }
  .mtop { position: sticky; transition: background 240ms linear, box-shadow 240ms linear; }
  .mobilebar .mpill {
    background: linear-gradient(180deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 55%), rgba(255,255,255,.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.45), 0 0 0 .5px rgba(31,34,38,.10), var(--shc);
    transition: background 240ms linear;
  }
  .mobilebar .mpill .mind { background: linear-gradient(180deg, #2A2E33 0%, #0A0A0B 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 16px rgba(10,10,11,.22); }
  .mobilebar .mfab { background: linear-gradient(180deg, #2A2E33 0%, #0A0A0B 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 .5px rgba(255,255,255,.08), 0 12px 28px rgba(10,10,11,.28); }
  /* scroll-edge fade: content softens as it slides under the bars */
  .mtop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent), color-mix(in srgb, var(--bg) 0%, transparent)); opacity: 0; transition: opacity 240ms linear; }
  /* adaptivity: a touch more opaque once content is underneath */
  html.scrolled .mtop { background: rgba(248,249,250,.62); box-shadow: 0 .5px 0 rgba(31,34,38,.08); }
  html.scrolled .mtop::after { opacity: 1; }
  html.scrolled .mobilebar .mpill { background: linear-gradient(180deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 55%), rgba(255,255,255,.6); }
}

/* v2 · glass correction — clear 50% pill (no extra layers while scrolled), one gentle highlight instead of a halo */
@media (max-width: 860px) {
  .mobilebar .mpill, html.scrolled .mobilebar .mpill {
    background: rgba(255,255,255,.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 .5px rgba(31,34,38,.08), 0 10px 30px rgba(31,34,38,.08);
  }
  .mobilebar .mpill .mind { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 12px rgba(10,10,11,.18); }
  .mobilebar .mfab { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(10,10,11,.24); }
}

/* v2 · bars at 35% + a softer edge fade under the top bar */
@media (max-width: 860px) {
  .mtop, html.scrolled .mtop { background: rgba(248,249,250,.35); }
  .mobilebar .mpill, html.scrolled .mobilebar .mpill { background: rgba(255,255,255,.35); }
  .mtop::after { height: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 28%, transparent), color-mix(in srgb, var(--bg) 0%, transparent)); }
  html.scrolled .mtop { box-shadow: 0 .5px 0 rgba(31,34,38,.05); }
}

/* v2 · blur 8px on both bars — shapes stay readable through the glass */
@media (max-width: 860px) {
  .mtop, .mobilebar .mpill { -webkit-backdrop-filter: blur(8px) saturate(180%); backdrop-filter: blur(8px) saturate(180%); }
}

/* v2 · sheets (Още, Фирми): 400ms ease-out quint — quick start, firm settle */
.sheet { transition: transform 400ms cubic-bezier(.22, 1, .36, 1); }
.sheet-bg { transition: background 400ms cubic-bezier(.22, 1, .36, 1); }

/* v2 · no Safari tap flash — our own soft press state that fades in/out */
@media (max-width: 860px) {
  .mobilebar a, .mobilebar button, .mtop button, .sheet a, .sheet button { -webkit-tap-highlight-color: transparent; }
  .mobilebar .mpill a, .mobilebar .mpill button { transition: transform 140ms cubic-bezier(.22, 1, .36, 1), color 160ms linear, background 260ms cubic-bezier(.22, 1, .36, 1); }
  .mobilebar .mpill a:not(.on):active, .mobilebar .mpill button:not(.on):active { background: rgba(31,34,38,.06); transition-duration: 140ms, 160ms, 90ms; }
  .msrch { transition: transform 140ms cubic-bezier(.22, 1, .36, 1), background 260ms cubic-bezier(.22, 1, .36, 1); }
  .msrch:active { background: rgba(31,34,38,.06); transition-duration: 140ms, 90ms; }
}

/* v2 · Още tab: Polaris Categories icon; when active, black pill with padding, no label */
@media (max-width: 860px) { .mobilebar .mpill #mmore.on { padding: 0 18px; } }

/* v2 · nav rule: active tab = Mist capsule + filled ink icon + label; label only on the selected tab; "+" is the only black element */
@media (max-width: 860px) {
  .mobilebar .mpill .ic-f { display: none; }
  .mobilebar .mpill .on .ic-o { display: none; } .mobilebar .mpill .on .ic-f { display: block; }
  .mobilebar .mpill .mind { background: #EFF1F3; box-shadow: none; }
  .mobilebar .mpill .on, .mobilebar .mpill .on .icon { color: var(--ink); }
  .mobilebar .mpill #mmore.on { padding: 0 18px 0 16px; }
  /* Още sheet: same glass as the bottom bar */
  .sheet { background: rgba(255,255,255,.35); -webkit-backdrop-filter: blur(8px) saturate(180%); backdrop-filter: blur(8px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 .5px rgba(31,34,38,.08), 0 -10px 30px rgba(31,34,38,.08); }
  .sheet-bg.shown { background: rgba(10,10,11,.06); }
  .sheet .sorg, .sheet .mechip { background: rgba(239,241,243,.7); }
  .sheet .orow { background: rgba(255,255,255,.55); }
}

/* v2 · Още sheet glass at 80% */
@media (max-width: 860px) { .sheet { background: rgba(255,255,255,.8); } }
