/* ============================================================ Brigston RP — «Мой Кабинет»
   Дополнение к style.css: те же токены (--accent, --glass, --stroke…), шрифты и карточки. */

.cab-page main { min-height: 100vh; }
.cab-page .section { padding: 132px 0 80px; }

/* ------------------------------------------------------------ ожидание */
.cab-wait { min-height: 70vh; display: grid; place-items: center; }
.cab-spinner { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .08);
  border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ------------------------------------------------------------ вход */
.cab-auth-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; min-height: calc(100vh - 260px); }
.cab-auth .head { margin-bottom: 0; }
.cab-steps { list-style: none; display: grid; gap: 12px; margin-top: 34px; }
.cab-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--stroke); }
.cab-steps b { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font: 800 15px var(--display);
  color: var(--ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px -10px var(--accent-glow); }
.cab-steps strong { display: block; font: 700 15px var(--display); }
.cab-steps span { color: var(--muted); font-size: 14px; }

.cab-login { padding: 32px; display: grid; gap: 18px; }
.cab-login h3 { font: 800 24px var(--display); }
.cab-login .field-row input { width: 100%; padding-right: 54px; }
.cab-login .field input { width: 100%; color: var(--text); outline: none; transition: border-color .25s, box-shadow .25s; }
.cab-eye { position: absolute; right: 8px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: color .2s, background .2s; }
.cab-eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.cab-eye[aria-pressed="true"] { color: var(--accent); }
.cab-eye .ic { width: 20px; height: 20px; }
.cab-error { padding: 12px 16px; border-radius: 12px; background: rgba(255, 77, 106, .1); border: 1px solid rgba(255, 77, 106, .4); color: #ff9aab; font-size: 14px; font-weight: 600; animation: fadeUp .4s var(--ease); }
.cab-note { font-size: 13px; color: var(--faint); }
.cab-note a, .cab-empty a { color: var(--accent); }

/* ------------------------------------------------------------ шапка кабинета */
.cab-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; padding: 28px 30px; }
.cab-avatar { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; font: 900 34px var(--display); color: var(--ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 18px 44px -16px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .5); }
.cab-name { font: 900 clamp(28px, 4vw, 46px)/1.05 var(--display); letter-spacing: -.01em; margin: 10px 0 12px; overflow-wrap: anywhere; }
.cab-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cab-tag { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); }
.cab-tag.acc { color: var(--accent); border-color: rgba(252, 221, 8, .35); background: rgba(252, 221, 8, .07); }
.cab-tag.mono { font-family: var(--mono); }
.cab-hero-side { display: grid; justify-items: end; gap: 12px; }
.cab-status { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, .03); color: var(--muted); white-space: nowrap; }
.cab-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.cab-status.on { color: var(--text); border-color: rgba(62, 224, 143, .35); }
.cab-status.on i { background: var(--ok); animation: pulse 2s infinite; }

/* ------------------------------------------------------------ цифры */
.cab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.cab-stat { padding: 22px 24px; display: grid; gap: 4px; }
.cab-stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cab-stat b { font: 800 clamp(22px, 2.4vw, 30px)/1.15 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cab-stat small { color: var(--faint); font-size: 13px; }
.cab-stat small a { color: var(--accent); }
.cab-stat-don b { color: var(--accent); }
.cab-live { font: 700 10px var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px;
  color: var(--ok); background: rgba(62, 224, 143, .1); border: 1px solid rgba(62, 224, 143, .35); }

/* ------------------------------------------------------------ вкладки */
.cab-tabs { position: relative; margin: 34px 0 20px; }
.cab-tabs .chip { position: relative; z-index: 1; font-family: var(--body); font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
  transition: color .35s var(--ease), background .35s var(--ease), border-color .35s, transform .35s var(--spring); }
/* выбранная вкладка: жёлтая подложка переезжает под кнопку, а не вспыхивает на месте */
.cab-tab-mark { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; border-radius: 12px; opacity: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 26px -10px var(--accent-glow);
  transition: transform .5s var(--spring), width .5s var(--spring), height .3s var(--ease), opacity .3s; }
.cab-tab-mark.ready { opacity: 1; }
.cab-tabs:has(.cab-tab-mark.ready) .chip.on { background: transparent; border-color: transparent; box-shadow: none; }
.cab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font: 700 11px var(--mono); font-style: normal;
  color: #fff; background: var(--bad); }
.chip.on .cab-badge { color: var(--bad); background: var(--ink); }
/* смена вкладки: старая гаснет, новая проявляется волной по карточкам, высота едет плавно */
.cab-panels { transition: height .4s var(--ease); }
.cab-panels.sizing { overflow: hidden; }
.cab-panel { display: none; }
.cab-panel.on { display: grid; gap: 16px; }
.cab-panel.on > * { animation: cabIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.cab-panel.out { display: grid; gap: 16px; opacity: 0; transform: translateY(-8px) scale(.99); filter: blur(2px);
  transition: opacity .17s ease, transform .17s ease, filter .17s ease; }
@keyframes cabIn { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
#cab-auth:not([hidden]), #cab-dash:not([hidden]) { animation: fadeUp .6s var(--ease); }

.cab-more { justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke);
  transition: background .25s, border-color .25s, transform .35s var(--spring); }
.cab-more:hover { background: rgba(255, 255, 255, .08); border-color: var(--stroke-hi); transform: translateY(-2px); }
.cab-more small { color: var(--faint); font-weight: 600; }
.cab-panel.calm > *, .cab-panel.calm .cab-list li { animation: none; }

/* ------------------------------------------------------------ карточки */
.cab-grid { display: grid; gap: 16px; }
.cab-grid-2 { grid-template-columns: repeat(2, 1fr); }
.cab-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cab-card { padding: 24px 26px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.cab-card h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 700 13px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cab-card-accent { border-color: rgba(252, 221, 8, .28); background: linear-gradient(160deg, rgba(252, 221, 8, .06), transparent 60%), var(--glass-solid); }
.cab-card-bad { border-color: rgba(255, 77, 106, .35); background: linear-gradient(160deg, rgba(255, 77, 106, .07), transparent 60%), var(--glass-solid); }
.cab-card-warn { border-color: rgba(255, 181, 71, .3); }
.cab-card .btn { justify-self: start; }
.cab-big { font: 800 clamp(24px, 2.6vw, 32px)/1.15 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cab-muted { color: var(--muted); font-size: 14px; }
.cab-empty { color: var(--faint); font-size: 14px; }
.cab-ok { color: var(--ok); }
.cab-bad { color: var(--bad); }
.cab-acc { color: var(--accent); }

.cab-kv { display: grid; gap: 0; }
.cab-kv div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.cab-kv div:last-child { border-bottom: 0; }
.cab-kv dt { color: var(--muted); flex: none; }
.cab-kv dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.cab-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font: 700 11px var(--body); letter-spacing: .02em; text-transform: none; white-space: nowrap;
  color: var(--muted); background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke); }
.cab-pill.ok { color: var(--ok); background: rgba(62, 224, 143, .08); border-color: rgba(62, 224, 143, .3); }
.cab-pill.bad { color: var(--bad); background: rgba(255, 77, 106, .08); border-color: rgba(255, 77, 106, .35); }
.cab-pill.wait { color: var(--warn); background: rgba(255, 181, 71, .08); border-color: rgba(255, 181, 71, .3); }
.cab-cats { display: inline-flex; gap: 6px; }
.cab-cat { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; font: 800 13px var(--mono); color: var(--ink); background: var(--accent); }

/* ------------------------------------------------------------ документы */
.cab-docs { display: grid; gap: 16px; }
.cab-docs-main { min-width: 0; width: 100%; max-width: 820px; justify-self: center; }

/* паспорт — один в один с игровым (Brp_Inventory/client/docs.lua), документ 880×556 */
.gp-wrap { container-type: inline-size; width: 100%; }
.gp { --u: calc(100cqw / 880); position: relative; width: 100%; aspect-ratio: 880 / 556; overflow: hidden; border-radius: calc(var(--u) * 22);
  color: rgb(26, 34, 56); font-family: Montserrat, var(--body);
  background: linear-gradient(to bottom, rgb(246, 243, 236), rgb(226, 233, 240));
  box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .35) inset; }
.gp > * { position: absolute; }
.gp-guil { left: calc(var(--u) * 10); top: calc(var(--u) * 100); width: calc(var(--u) * 860); height: calc(var(--u) * 366);
  fill: none; stroke: rgb(190, 120, 140); stroke-width: 1; opacity: .24; }
.gp-head { left: 0; top: 0; width: 100%; height: calc(var(--u) * 96); background: linear-gradient(105deg, rgb(152, 32, 48), rgb(96, 18, 36)); }
.gp-head > * { position: absolute; }
.gp-guil2 { left: calc(var(--u) * 16); top: calc(var(--u) * 6); width: calc(var(--u) * 848); height: calc(var(--u) * 84);
  fill: none; stroke: rgb(255, 220, 160); stroke-width: 1; opacity: .16; }
.gp-logo { left: calc(var(--u) * 26); top: calc(var(--u) * 18); width: calc(var(--u) * 58); height: calc(var(--u) * 58); }
.gp-state { left: calc(var(--u) * 100); top: calc(var(--u) * 20); height: calc(var(--u) * 26); display: flex; align-items: center;
  font: 800 calc(var(--u) * 20) Montserrat, var(--body); letter-spacing: calc(var(--u) * 3); color: rgb(242, 214, 150); white-space: nowrap; }
.gp-sub { left: calc(var(--u) * 100); top: calc(var(--u) * 50); height: calc(var(--u) * 22); display: flex; align-items: center;
  font: 600 calc(var(--u) * 12) Montserrat, var(--body); color: rgba(255, 236, 200, .86); white-space: pre; }
.gp-ser { right: calc(var(--u) * 30); top: calc(var(--u) * 18); display: grid; justify-items: end; }
.gp-ser small { height: calc(var(--u) * 16); display: flex; align-items: center; font: 600 calc(var(--u) * 9.5) Montserrat, var(--body); color: rgba(255, 220, 170, .78); }
.gp-ser b { height: calc(var(--u) * 28); display: flex; align-items: center; font: 700 calc(var(--u) * 17) var(--mono); color: rgb(255, 236, 200); white-space: pre; }
.gp-photo, .gp-ghost { overflow: hidden; border-radius: calc(var(--u) * 10); background: linear-gradient(160deg, rgb(214, 222, 232), rgb(178, 190, 206)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.gp-photo { left: calc(var(--u) * 34); top: calc(var(--u) * 122); width: calc(var(--u) * 206); height: calc(var(--u) * 262); }
.gp-photo img, .gp-ghost img { width: 100%; height: 100%; object-fit: cover; }
.gp-siglab { left: calc(var(--u) * 34); top: calc(var(--u) * 394); height: calc(var(--u) * 14); display: flex; align-items: center;
  font: 600 calc(var(--u) * 9.5) Montserrat, var(--body); color: rgb(112, 118, 136); }
.gp-sig { left: calc(var(--u) * 34); top: calc(var(--u) * 406); width: calc(var(--u) * 206); height: calc(var(--u) * 48);
  fill: none; stroke: rgb(30, 50, 120); stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.gp-f { display: grid; }
.gp-f small { height: calc(var(--u) * 16); display: flex; align-items: center; font: 600 calc(var(--u) * 9.5) Montserrat, var(--body); color: rgb(112, 118, 136); white-space: nowrap; }
.gp-f b { height: calc(var(--u) * 28); display: flex; align-items: center; font: 600 calc(var(--u) * 16) Montserrat, var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-f b.big { font: 800 calc(var(--u) * 20) Montserrat, var(--body); }
.gp-ghost { left: calc(var(--u) * 630); top: calc(var(--u) * 372); width: calc(var(--u) * 70); height: calc(var(--u) * 90); opacity: .25;
  background: linear-gradient(160deg, rgb(230, 220, 225), rgb(210, 200, 210)); }
.gp-holo { left: calc(var(--u) * 718); top: calc(var(--u) * 376); width: calc(var(--u) * 84); height: calc(var(--u) * 84); border-radius: 50%; overflow: hidden; }
.gp-holo i { position: absolute; inset: 0; border-radius: 50%; opacity: .45;
  background: conic-gradient(from 0deg, #ff7878, #ffff78, #78ff78, #78ffff, #7878ff, #ff78ff, #ff7878); animation: gpHolo 4s linear infinite; }
.gp-holo::after { content: ''; position: absolute; inset: 10%; border-radius: 50%; opacity: .35;
  background: radial-gradient(circle, rgba(120, 255, 255, .9), rgba(255, 120, 255, .6)); animation: gpHolo 4s linear infinite reverse; }
.gp-holo img { position: absolute; z-index: 1; left: 22.5%; top: 22.5%; width: 55%; height: 55%; opacity: .47; }
@keyframes gpHolo { to { filter: hue-rotate(360deg); } }
.gp-vnum { right: calc(var(--u) * 10); top: calc(var(--u) * 110); width: calc(var(--u) * 40); height: calc(var(--u) * 290); display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; font: 700 calc(var(--u) * 17) var(--mono); color: rgba(200, 40, 56, .9); white-space: pre; }
.gp-mrz { left: 0; bottom: 0; width: 100%; height: calc(var(--u) * 84); padding: calc(var(--u) * 10) calc(var(--u) * 30) 0; background: rgb(222, 226, 233);
  display: grid; align-content: start; }
.gp-mrz span { height: calc(var(--u) * 32); display: flex; align-items: center; font: 700 calc(var(--u) * 17) var(--mono); letter-spacing: calc(var(--u) * 1.2);
  color: rgba(30, 34, 44, .94); white-space: pre; overflow: hidden; }

/* ------------------------------------------------------------ списки */
.cab-list { list-style: none; display: grid; }
.cab-list li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.cab-list li:last-child { border-bottom: 0; }
.cab-list.cab-sess li { grid-template-columns: minmax(0, 1fr) auto; }
.cab-when { color: var(--faint); font: 500 12px var(--mono); }
.cab-what { min-width: 0; overflow-wrap: anywhere; }
.cab-what small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.cab-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cab-after { color: var(--faint); font-size: 12px; text-align: right; white-space: nowrap; }
.cab-card + .cab-card { margin-top: 0; }
.cab-card .cab-list + .btn { margin-top: 6px; }

.cab-timeline { list-style: none; display: grid; gap: 0; position: relative; padding-left: 22px; }
.cab-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), rgba(252, 221, 8, .05)); }
.cab-timeline li { position: relative; padding: 10px 0 14px; display: grid; gap: 2px; }
.cab-timeline li::before { content: ''; position: absolute; left: -22px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.cab-timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.cab-timeline b { font: 700 15px var(--display); }
.cab-timeline span { color: var(--muted); font-size: 14px; }
.cab-timeline small { color: var(--faint); font-size: 12px; }

/* ------------------------------------------------------------ машины */
.cab-car { padding: 22px; display: grid; gap: 16px; align-content: start; min-width: 0; transition: border-color .3s, transform .5s var(--ease); }
.cab-car:hover { border-color: var(--stroke-hi); transform: translateY(-3px); }
.cab-car-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.cab-car-top b { display: block; font: 700 17px var(--display); overflow-wrap: anywhere; }
.cab-car-top small { color: var(--faint); font-size: 12px; }
.cab-swatch { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 -10px 18px rgba(0, 0, 0, .35), 0 8px 20px -10px var(--c); }
/* госномер как в игре (Brp_Number): табличка 512×128, черта на 384, справа флаг Бригстона с белым краем */
@font-face { font-family: 'BrpPlate'; src: url(assets/cabinet/rn.ttf) format('truetype'); font-display: swap; }
.plate { justify-self: start; container-type: inline-size; width: 216px; max-width: 100%; aspect-ratio: 512 / 128; display: grid; grid-template-columns: 75% 25%;
  background: rgb(248, 248, 248); border-radius: 5px; box-shadow: 0 0 0 2px #0c0c0e, 0 0 0 4px rgba(255, 255, 255, .08), 0 10px 22px -12px rgba(0, 0, 0, .8); overflow: hidden; }
/* единицы — доли ширины таблички (cqw): 1 пиксель игровой текстуры 512 = 0.195cqw */
.pl-ser { display: flex; align-items: center; justify-content: center; gap: 2.7cqw; color: #000; border-right: .78cqw solid #000;
  font: 400 19cqw/1 'BrpPlate', var(--mono); padding: 0 2cqw; overflow: hidden; }
.pl-ser span { letter-spacing: 1.2cqw; margin-right: -1.2cqw; }
.pl-ser .pl-raw { font-size: 13cqw; }
.pl-flag { display: grid; grid-template-rows: 1fr 1fr 1fr; margin: 2.34cqw; }
.pl-flag b:nth-child(1), .pl-flag b:nth-child(3) { background: rgb(8, 8, 10); }
.pl-flag b:nth-child(2) { background: rgb(252, 221, 8); }
.cab-plate.none { justify-self: start; padding: 6px 12px; border-radius: 7px; border: 1px dashed var(--stroke-hi); color: var(--faint); font-size: 13px; }
.cab-car-ins { display: flex; flex-wrap: wrap; gap: 6px; }
.cab-alert { padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #ff9aab; background: rgba(255, 77, 106, .1); border: 1px solid rgba(255, 77, 106, .35); }

/* ------------------------------------------------------------ закон */
.cab-stars { display: flex; gap: 4px; font-size: 26px; line-height: 1; }
.cab-stars i { font-style: normal; color: rgba(255, 255, 255, .12); }
.cab-stars i.on { color: var(--accent); text-shadow: 0 0 14px var(--accent-glow); }

/* ------------------------------------------------------------ донат */
.cab-ref { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cab-ref code { padding: 8px 14px; border-radius: 10px; font: 700 18px var(--mono); letter-spacing: .08em; color: var(--accent); background: rgba(252, 221, 8, .08); border: 1px dashed rgba(252, 221, 8, .45); }

.cab-foot { margin-top: 26px; color: var(--faint); font-size: 12px; text-align: center; }

/* ------------------------------------------------------------ ссылки, формы, кнопки */
.cab-link { justify-self: start; padding: 2px 0; font-size: 14px; font-weight: 600; color: var(--accent); transition: opacity .2s; }
.cab-link:hover { opacity: .8; }
.cab-error.ok { background: rgba(62, 224, 143, .1); border-color: rgba(62, 224, 143, .4); color: #9ff2c8; }
.cab-form { display: grid; gap: 14px; }
.cab-form .field input, .cab-form .field select, .cab-form .field textarea { width: 100%; color: var(--text); outline: none; font: inherit; font-size: 15px;
  border-radius: 14px; background: rgba(0, 0, 0, .4); border: 1px solid var(--stroke-hi); transition: border-color .25s, box-shadow .25s; }
.cab-form .field input, .cab-form .field select { height: 50px; padding: 0 16px; }
.cab-form .field textarea { padding: 14px 16px; resize: vertical; min-height: 110px; line-height: 1.5; }
.cab-form .field select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.cab-form .field select option { background: #15151c; color: var(--text); }
.cab-form .field input:focus, .cab-form .field select:focus, .cab-form .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(252, 221, 8, .12); }
.cab-form .field > span { display: flex; justify-content: space-between; align-items: baseline; }
.cab-form .field > span small { color: var(--faint); font-weight: 500; }
.cab-form .btn { justify-self: start; }
.cab-note-bad { font-size: 13px; color: #ff9aab; }
.cab-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.cab-pay { padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--ink); white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); transition: transform .3s var(--spring), opacity .2s, box-shadow .3s; }
.cab-pay:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px var(--accent-glow); }
.cab-pay:disabled { background: rgba(255, 255, 255, .06); color: var(--faint); cursor: not-allowed; transform: none; box-shadow: none; }

.cab-code-row { display: flex; gap: 10px; }
.cab-code-row input { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 14px; font: 700 17px var(--mono); letter-spacing: .08em; color: var(--text);
  background: rgba(0, 0, 0, .4); border: 1px solid var(--stroke-hi); outline: none; text-transform: uppercase; transition: border-color .25s, box-shadow .25s; }
.cab-code-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(252, 221, 8, .12); }
.cab-code-row .btn { flex: none; }
@media (max-width: 560px) { .cab-code-row { flex-direction: column; } .cab-code-row input { font-size: 15px; } }

/* ------------------------------------------------------------ коды доната (админы) */
.cab-tabs .chip-admin { color: var(--accent); border-color: rgba(252, 221, 8, .3); }
.cab-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cab-card .table-wrap { overflow-x: auto; }
.cab-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cab-table th, .cab-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--stroke); color: var(--muted); font-variant-numeric: tabular-nums; }
.cab-table th { color: var(--faint); font-weight: 600; font-size: 12px; }
.cab-table td b { display: block; color: var(--text); }
.cab-table td small { color: var(--faint); font-size: 11px; }
.cab-table tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .cab-form-row { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ баннер «нет восстановления пароля» */
.cab-banner { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: 16px; font-size: 14px; color: #fff1a0;
  background: rgba(252, 221, 8, .07); border: 1px solid rgba(252, 221, 8, .35); animation: fadeUp .6s var(--ease); }
.cab-banner .ic { flex: none; width: 22px; height: 22px; color: var(--accent); }
.cab-banner div { flex: 1; }
.cab-banner b { color: var(--text); }
.cab-banner .btn { flex: none; }

/* ------------------------------------------------------------ колокольчик */
.cab-hero-side { position: relative; }
.cab-hero-btns { display: flex; align-items: center; gap: 10px; }
.cab-bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted);
  background: var(--glass-hi); border: 1px solid var(--stroke-hi); transition: color .25s, border-color .25s, transform .35s var(--spring); }
.cab-bell:hover { color: var(--text); transform: translateY(-2px); }
.cab-bell .ic { width: 20px; height: 20px; }
.cab-bell.has { color: var(--accent); border-color: rgba(252, 221, 8, .45); }
.cab-bell.has .ic { animation: bellRing 2.4s var(--ease) infinite; transform-origin: 50% 10%; }
@keyframes bellRing { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 88% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
.cab-bell em { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center;
  font: 700 10px var(--mono); font-style: normal; color: #fff; background: var(--bad); box-shadow: 0 0 0 3px var(--bg); }
.cab-notes { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: min(380px, calc(100vw - 40px)); max-height: 440px; overflow: auto; padding: 8px;
  background: rgba(16, 16, 22, .97); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
  /* раскрывается из колокольчика: прозрачность, масштаб и сдвиг — плавно в обе стороны */
  transform-origin: calc(100% - 60px) -10px; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-10px) scale(.94); filter: blur(4px);
  transition: opacity .22s var(--ease), transform .45s var(--spring), filter .3s var(--ease), visibility 0s linear .45s; }
.cab-notes.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; filter: none;
  transition: opacity .25s var(--ease), transform .5s var(--spring), filter .3s var(--ease), visibility 0s; }
.cab-notes li { opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .4s var(--ease); }
.cab-notes.open li { opacity: 1; transform: none; transition-delay: calc(.06s + var(--i, 0) * 40ms); }
.cab-bell.on { color: var(--text); border-color: rgba(252, 221, 8, .45); background: rgba(252, 221, 8, .08); }
.cab-notes-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--stroke); }
.cab-notes-head b { font: 700 14px var(--display); }
.cab-notes ul { list-style: none; display: grid; }
.cab-notes li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 10px; border-radius: 12px; }
.cab-notes li + li { border-top: 1px solid var(--stroke); }
.cab-notes li.new { background: rgba(252, 221, 8, .05); }
.cab-notes li i { font-style: normal; font-size: 18px; line-height: 1.2; }
.cab-notes li b { display: block; font-size: 14px; }
.cab-notes li span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cab-notes li small { color: var(--faint); font-size: 11px; }
.cab-notes .cab-empty { padding: 14px 10px; }

/* ------------------------------------------------------------ Discord и переключатели */
.cab-discord { display: flex; align-items: center; gap: 14px; }
.cab-discord b { display: block; }
.cab-discord span { color: var(--muted); font-size: 13px; }
.cab-ds-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: #5865f2; font-style: normal; }
.cab-code { display: grid; justify-items: start; gap: 2px; padding: 14px 18px; border-radius: 14px; background: rgba(88, 101, 242, .12); border: 1px dashed rgba(120, 132, 255, .55); }
.cab-code small { color: var(--muted); font-size: 12px; }
.cab-code b { font: 800 34px var(--mono); letter-spacing: .14em; color: var(--text); }
.cab-howto { margin: 0 0 0 18px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.cab-howto a { color: var(--accent); }
.cab-howto code { font: 600 13px var(--mono); color: var(--text); background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 6px; }
.cab-toggles { display: grid; gap: 4px; }
.cab-toggle { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; font-size: 14px; }
.cab-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cab-toggle i { flex: none; position: relative; width: 40px; height: 23px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid var(--stroke-hi); transition: background .3s; }
.cab-toggle i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted); transition: transform .35s var(--spring), background .3s; }
.cab-toggle input:checked + i { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.cab-toggle input:checked + i::after { transform: translateX(17px); background: var(--ink); }
.cab-toggle input:focus-visible + i { box-shadow: 0 0 0 4px rgba(252, 221, 8, .25); }
.cab-toggle input:disabled + i, .cab-toggle input:disabled ~ span { opacity: .45; }

/* ------------------------------------------------------------ статистика */
/* суммы — цветом текста, а принадлежность к серии показывает квадратик (цвет серии только у меток) */
.cab-in, .cab-out { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.cab-in::before, .cab-out::before { content: ''; width: 12px; height: 12px; border-radius: 3px; }
.cab-in::before { background: #3a86f0; }
.cab-out::before { background: #c8740a; }
.ch { position: relative; }
.ch svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.ch-zero { stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.ch-ax { fill: var(--faint); font: 500 11px var(--mono); }
.ch-bar { fill: var(--accent); }
path.ch-in { fill: #3a86f0; }
path.ch-out { fill: #c8740a; }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-hit.on { fill: rgba(255, 255, 255, .05); }
.ch-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 7px 11px; border-radius: 10px; white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 600; color: var(--text); background: #1c1c25; border: 1px solid var(--stroke-hi); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8); }
.ch-legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.ch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ch-legend i { width: 12px; height: 12px; border-radius: 3px; }
.ch-legend i.ch-in { background: #3a86f0; }
.ch-legend i.ch-out { background: #c8740a; }
.ch-table summary { cursor: pointer; color: var(--faint); font-size: 12px; }
.ch-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.ch-table th, .ch-table td { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--stroke); color: var(--muted); }
.ch-table th { color: var(--faint); font-weight: 600; }
.cab-top { list-style: none; display: grid; gap: 2px; }
.cab-top li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 14px; }
.cab-top li b { font: 800 14px var(--display); color: var(--faint); text-align: center; }
.cab-top li:nth-child(-n+3) b { color: var(--accent); }
.cab-top li em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.cab-top li.me { background: rgba(252, 221, 8, .08); box-shadow: inset 0 0 0 1px rgba(252, 221, 8, .3); }

/* ------------------------------------------------------------ окно подтверждения */
.cab-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(4, 4, 7, .6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s var(--ease); }
.cab-modal.show { opacity: 1; }
.cab-modal-box { width: min(440px, 100%); padding: 26px; display: grid; gap: 12px; transform: translateY(14px) scale(.97); transition: transform .35s var(--spring);
  background: rgba(18, 18, 24, .98); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); }
.cab-modal.show .cab-modal-box { transform: none; }
.cab-modal-box h3 { font: 800 20px var(--display); }
.cab-modal-box p { color: var(--muted); }
.cab-modal-box p b { color: var(--text); }
.cab-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ------------------------------------------------------------ адаптив */
@media (max-width: 1080px) {
  .cab-stats { grid-template-columns: repeat(2, 1fr); }
  .cab-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cab-docs { grid-template-columns: 1fr; }
  .cab-docs-main { width: 100%; max-width: 620px; justify-self: center; }
}
@media (max-width: 900px) {
  .cab-auth-grid { grid-template-columns: 1fr; gap: 36px; min-height: 0; }
  .cab-grid-2 { grid-template-columns: 1fr; }
  .cab-hero { grid-template-columns: auto 1fr; }
  .cab-hero-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; justify-items: start; align-items: center; }
  .cab-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 4px 20px; }
  .cab-tabs::-webkit-scrollbar { display: none; }
  .cab-tabs .chip { flex: none; }
  .cab-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .cab-list .cab-when { grid-column: 1 / -1; }
  .cab-list .cab-pill, .cab-list .cab-after { grid-column: 2; justify-self: end; }
}
@media (max-width: 560px) {
  .cab-page .section { padding: 104px 0 56px; }
  .cab-hero { padding: 22px; gap: 16px; }
  .cab-avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }
  .cab-stats { gap: 10px; }
  .cab-stat { padding: 16px; }
  .cab-grid-3 { grid-template-columns: 1fr; }
  .cab-card { padding: 20px; }
  .cab-login { padding: 24px 20px; }
  .cab-kv div { flex-direction: column; gap: 2px; }
  .cab-kv dd { text-align: left; }
  .cab-banner { flex-wrap: wrap; }
  .cab-code b { font-size: 28px; }
}
@media (max-width: 480px) {
  .cab-stats { grid-template-columns: 1fr; }
  .cab-stat { grid-template-columns: 1fr auto; align-items: baseline; }
  .cab-stat-label { grid-column: 1 / -1; }
  .cab-stat small { text-align: right; }
}

/* ---------------------------------------------- вкладка «Новости» (админы) */
.cab-form .field input[type=datetime-local] { color-scheme: dark; }
.news-cover { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.news-cover-prev { width: 168px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255, 255, 255, .04); border: 1px dashed var(--stroke-hi); color: var(--faint); font-size: 12px; }
.news-cover-prev img { width: 100%; height: 100%; object-fit: cover; animation: newsIn .4s var(--ease) both; }
.news-cover-btns { display: grid; gap: 6px; justify-items: start; }
.news-cover-btns small { color: var(--faint); font-size: 12px; }
.news-upload { cursor: pointer; }
.news-upload.busy { opacity: .6; pointer-events: none; }
.news-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.news-where > span { width: 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
.news-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.news-check input { position: absolute; opacity: 0; pointer-events: none; }
.news-check i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--stroke-hi); background: rgba(255, 255, 255, .04);
  display: grid; place-items: center; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.news-check i::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease); margin-top: -2px; }
.news-check input:checked + i { background: var(--accent); border-color: var(--accent); }
.news-check input:checked + i::after { transform: rotate(-45deg) scale(1); }
.news-check input:focus-visible + i { box-shadow: 0 0 0 4px rgba(252, 221, 8, .2); }
.news-check:active i { transform: scale(.92); }
.news-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.news-preview .news-card { opacity: 1; transform: none; min-height: 0; pointer-events: none; }
.news-preview { margin-bottom: 12px; }
.news-admin-list { list-style: none; display: grid; gap: 10px; }
.news-admin-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--stroke); transition: border-color .2s, background .2s; }
.news-admin-list li:hover { border-color: var(--stroke-hi); background: rgba(255, 255, 255, .04); }
.news-admin-list li.sched { border-style: dashed; }
.news-admin-list img, .news-noimg { width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; display: block;
  background: radial-gradient(circle at 70% 30%, rgba(252, 221, 8, .18), rgba(255, 255, 255, .03)); }
.news-li-main { display: grid; gap: 4px; min-width: 0; }
.news-li-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-li-main small { color: var(--muted); font-size: 12.5px; }
.news-chans { display: flex; gap: 6px; flex-wrap: wrap; }
.news-chans i { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.news-chans i.ok { background: rgba(62, 224, 143, .12); color: var(--ok); }
.news-chans i.wait { background: rgba(255, 181, 71, .12); color: var(--warn); }
.news-li-btns { display: grid; gap: 4px; justify-items: end; }
.cab-link.danger { color: var(--bad); }
@media (max-width: 620px) {
  .news-admin-list li { grid-template-columns: 72px 1fr; }
  .news-admin-list img, .news-noimg { width: 72px; }
  .news-li-btns { grid-column: 1 / -1; display: flex; gap: 16px; justify-content: flex-start; }
}

/* панель оформления текста новости */
.news-form .field > span { display: flex; justify-content: space-between; align-items: baseline; }
.md-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; margin-top: 8px; border: 1px solid var(--stroke); border-bottom: 0;
  border-radius: 14px 14px 0 0; background: rgba(255, 255, 255, .03); }
.md-bar button { min-width: 34px; height: 32px; padding: 0 8px; border-radius: 9px; color: var(--muted); font: 600 14px var(--body);
  transition: background .2s, color .2s, transform .15s var(--ease); }
.md-bar button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.md-bar button:active { transform: scale(.92); }
.md-bar .md-sep { width: 1px; height: 18px; background: var(--stroke-hi); margin: 0 4px; }
.news-form .md-bar + textarea { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; margin-top: 0; }
.news-form textarea { width: 100%; color: var(--text); outline: none; font: inherit; font-size: 15px; padding: 14px 16px; resize: vertical; min-height: 220px; line-height: 1.6;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke-hi); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.news-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(252, 221, 8, .12); }
.news-full { margin-top: 16px; padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, .025); border: 1px solid var(--stroke); max-height: 520px; overflow: auto; }
.news-full-label { display: block; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.news-full .news-content { font-size: 15px; line-height: 1.7; }
.news-full .news-content p + p { margin-top: 10px; }
