/* Кабинет «кадетова» — в стиле сайта kadetovabuh.ru */
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url(/fonts/golos-cyrillic-400.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url(/fonts/golos-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url(/fonts/golos-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url(/fonts/golos-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url(/fonts/golos-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url(/fonts/golos-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url(/fonts/golos-cyrillic-600.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url(/fonts/golos-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url(/fonts/golos-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-weight: 400; font-display: swap; src: url(/fonts/unbounded-cyrillic-400.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 400; font-display: swap; src: url(/fonts/unbounded-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 400; font-display: swap; src: url(/fonts/unbounded-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(/fonts/unbounded-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --paper: #F4F2EC; --sand: #EEECE6; --white: #FFFFFF;
  --ink: #29232C; --aub: #38283E; --aub-2: #4A3852; --aub-line: #54435B;
  --muted: #6B6470; --line: #D8D3D8; --line-2: #E6E2E6;
  --lime: #D7E3A1; --lime-ink: #3E4420; --bronze: #855F33;
  --on-aub: #F4F2EC; --on-aub-muted: #CDBFD2;
  --red: #B3261E; --red-bg: #FBE7E4; --red-ink: #8C1D17;
  --amber: #B26A00; --amber-bg: #FBEFD9; --amber-ink: #6E4100;
  --green: #1F7A4D; --green-bg: #E2F1E8;
  --r: 10px; --r-sm: 6px;
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { font-variant-numeric: tabular-nums; }
a { color: var(--aub); }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--aub); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- каркас ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; padding: 24px 18px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.side.dark { background: var(--aub); color: var(--on-aub); }
.main { flex: 1; min-width: 0; padding: 28px 32px 56px; max-width: 1180px; }
.logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.logo b { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -1.4px; line-height: 1.1; }
.logo span { font-size: 11px; color: var(--muted); }
.side.dark .logo span { color: var(--on-aub-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 500; }
.nav a:hover { background: var(--sand); color: inherit; }
.nav a.on { background: var(--aub); color: var(--on-aub); }
.side.dark .nav a:hover { background: var(--aub-2); }
.side.dark .nav a.on { background: var(--lime); color: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.side-foot .who { color: var(--muted); }
.side.dark .side-foot .who { color: var(--on-aub-muted); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; text-align: left; }
.topbar { display: none; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .topbar.dark { background: var(--aub); color: var(--on-aub); border-color: var(--aub); }
  .topbar .logo b { font-size: 18px; }
  .main { padding: 18px 16px 48px; }
  .mnav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; }
  .mnav a { white-space: nowrap; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
  .mnav a.on { background: var(--aub); border-color: var(--aub); color: var(--on-aub); }
}
@media (min-width: 861px) { .mnav { display: none; } }

/* ---------- типографика ---------- */
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--bronze); }
h1 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: -1.2px; line-height: 1.15; margin: 6px 0 0; }
h2 { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: -0.6px; margin: 0; }
.big { font-family: var(--display); font-weight: 400; letter-spacing: -1.6px; line-height: 1.05; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- блоки ---------- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; }
.card.dark { background: var(--aub); border-color: var(--aub); color: var(--on-aub); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--sand); border-radius: var(--r-sm); padding: 12px 14px; }
.tile .v { font-size: 18px; font-weight: 600; margin-top: 2px; }
.rows > * { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.rows > *:first-child { border-top: 0; }
.rows .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rows .sum { white-space: nowrap; font-weight: 500; }
.empty { color: var(--muted); padding: 6px 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.lime { background: var(--lime); color: var(--ink); }
.pill.line { border: 1px solid var(--line); background: var(--white); font-weight: 500; color: var(--ink); }
.pill.red { background: var(--red-bg); color: var(--red-ink); }
.pill.amber { background: var(--amber-bg); color: var(--amber-ink); }
.pill.green { background: var(--green-bg); color: var(--green); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.error { background: var(--red); } .dot.warn { background: var(--amber); } .dot.ok { background: var(--green); }

.btn { min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--aub); background: var(--aub); color: var(--on-aub); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ink); color: var(--on-aub); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--aub); background: var(--white); color: var(--ink); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: default; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* налог */
.tax .amount { font-size: 44px; color: var(--lime); margin-top: 14px; }
.tax .sub { color: var(--on-aub-muted); font-size: 14px; margin-top: 6px; }
.tax .next { border-top: 1px solid var(--aub-line); margin-top: 18px; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.tax .next span:first-child { color: var(--on-aub-muted); }
@media (max-width: 520px) { .tax .amount { font-size: 36px; } h1 { font-size: 24px; } }

/* график */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; margin-top: 16px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 38px; border-radius: 4px 4px 2px 2px; background: var(--line); min-height: 3px; }
.bar.cur i { background: var(--lime); box-shadow: inset 0 0 0 1px #B9C77A; }
.bar.prev i { background: var(--aub); }
.bar span { font-size: 11px; color: var(--muted); }
.bar em { font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) { .bars { gap: 4px; height: 130px; } .bar em { display: none; } .bar span { font-size: 10px; } }

/* таблица клиентов */
.tablebox { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; min-width: 720px; }
table.list th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 12px 10px; }
table.list td { padding: 13px 12px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #FAF9F6; }
table.list td:first-child, table.list th:first-child { padding-left: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.chip.on { background: var(--aub); color: var(--on-aub); border-color: var(--aub); }

.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--sand); }
.check .dot { margin-top: 6px; }
.check b { font-weight: 600; display: block; }

/* формы */
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.f input, label.f select, label.f textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--ink); font-size: 15px; }
label.f input:focus, label.f select:focus { border-color: var(--aub); outline: none; box-shadow: 0 0 0 3px #38283E22; }
.hint { font-size: 12px; color: var(--muted); }
.err { background: var(--red-bg); color: var(--red-ink); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.okbox { background: var(--green-bg); color: var(--green); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: 1px; background: var(--sand); padding: 12px 14px; border-radius: var(--r-sm); word-break: break-all; user-select: all; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--aub); }

/* вход */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 420px; padding: 30px; }
.auth h1 { font-size: 24px; margin: 22px 0 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm); font-size: 14px; z-index: 20; max-width: calc(100% - 32px); }
.foot-note { font-size: 12px; color: var(--muted); margin-top: 22px; }
