/* ==========================================================================
   Void-Project — общий стиль сайта, ЛК и панели
   Глубокий чёрный, фиолетовый акцент, Onest + JetBrains Mono, свечение за курсором
   ========================================================================== */

@font-face { font-family: "Onest"; src: url("../fonts/Onest-cyrillic.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("../fonts/Onest-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-cyrillic.woff2") format("woff2"); font-weight: 400 600; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 400 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  --bg:        #060609;
  --bg-2:      #09090d;
  --panel:     #0b0b10;
  --card:      #0d0d13;
  --card-2:    #121119;
  --frame:     #16151e;
  --hover:     #1c1b26;
  --border:    #17161f;
  --border-2:  #23222d;
  --text:      #f3f2f7;
  --sub:       #a9a7b6;
  --dim:       #8e8c9c;
  --accent:    #7c5cff;
  --accent-2:  #a994ff;
  --accent-3:  #6a4bf0;
  --accent-a:  rgba(124,92,255,.14);
  --accent-b:  rgba(124,92,255,.35);
  --on-accent: #ffffff;
  --green:     #4fdca0;
  --yellow:    #f2c45a;
  --red:       #ff5d6e;
  --blue:      #79b0ff;

  --r-sm: 9px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 22px;

  --shadow:    0 20px 40px -24px rgba(0,0,0,.8);
  --shadow-lg: 0 40px 100px -30px rgba(0,0,0,.9);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-b); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }

/* --------------------------------------------------------------- типографика */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 800; letter-spacing: -0.045em; line-height: .98; }
h2 { font-size: clamp(28px, 3.8vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
p  { margin: 0; }
.muted { color: var(--sub); }
.dim   { color: var(--dim); }
.small { font-size: 12.5px; }
.mono  { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-2); font-weight: 500; }
.accent { color: var(--accent-2); }
.grad-text { color: var(--text); }

/* ------------------------------------------------------------------- кнопки */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--border-2);
  background: var(--card-2);
  font-weight: 600; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s, color .15s, opacity .15s;
}
.btn:hover { background: var(--hover); border-color: #34344a; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 10px 34px -14px rgba(124,92,255,.85); }
.btn.primary:hover { background: #8a6dff; }
.btn.ghost  { background: transparent; border-color: transparent; color: var(--sub); }
.btn.ghost:hover { background: rgba(255,255,255,.045); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: rgba(255,93,110,.45); background: rgba(255,93,110,.08); }
.btn.sm  { --h: 32px; padding: 0 13px; font-size: 13px; }
.btn.lg  { --h: 48px; padding: 0 24px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn.icon { width: var(--h); padding: 0; }
.btn .spinner { width: 15px; height: 15px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.16); border-top-color: currentColor; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------- формы */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 12.5px; color: var(--sub); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #4d4d63; }
.input:hover, .select:hover, .textarea:hover { border-color: #34344a; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-a); background: var(--card); }
.input.mono { font-family: var(--mono); letter-spacing: .04em; }
.input-wrap { position: relative; }
.input-wrap > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.input-wrap > .suffix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a2a2b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.field-error { color: var(--red); font-size: 12.5px; min-height: 18px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--sub); font-size: 13px; user-select: none; }
.check input { appearance: none; width: 17px; height: 17px; margin: 0; border-radius: 5px; border: 1px solid var(--border-2); background: var(--frame); display: grid; place-content: center; cursor: pointer; transition: .15s; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 99px; background: var(--frame); border: 1px solid var(--border-2); cursor: pointer; transition: .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--dim); transition: .2s; }
.switch input:checked { background: var(--accent); border-color: transparent; }
.switch input:checked::after { left: 21px; background: #fff; }
.switch input:disabled { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel); border: 1px solid var(--border); border-radius: 99px; }
.seg button { height: 32px; padding: 0 14px; border: 0; background: transparent; color: var(--dim); border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; }
.seg button:hover { color: var(--sub); }
.seg button.on { background: var(--text); color: var(--bg); }

/* ---------------------------------------------------------------- карточки */
.card {
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  position: relative;
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 20px; }

.badge-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--frame); border: 1px solid var(--border-2); color: var(--sub);
}
.badge-ico.on { background: var(--accent-a); color: var(--accent-2); border-color: rgba(124,92,255,.3); }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--sub); background: rgba(255,255,255,.035); border: 1px solid var(--border-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill.green  { color: var(--green);  background: rgba(79,220,160,.08);  border-color: rgba(79,220,160,.24); }
.pill.green::before { box-shadow: 0 0 0 3px rgba(79,220,160,.18); animation: beat 2.4s ease-in-out infinite; }
.pill.yellow { color: var(--yellow); background: rgba(242,196,90,.08);  border-color: rgba(242,196,90,.24); }
.pill.red    { color: var(--red);    background: rgba(255,93,110,.08);  border-color: rgba(255,93,110,.24); }
.pill.blue   { color: var(--blue);   background: rgba(121,176,255,.08); border-color: rgba(121,176,255,.24); }
.pill.white  { color: var(--accent-2); background: var(--accent-a); border-color: rgba(124,92,255,.32); }
@keyframes beat { 50% { box-shadow: 0 0 0 5px rgba(79,220,160,0); } }

.role { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  background: var(--frame); border: 1px solid var(--border-2); color: var(--sub); }
.role.admin   { background: var(--accent); color: #fff; border-color: transparent; }
.role.manager { color: var(--accent-2); border-color: rgba(124,92,255,.32); background: var(--accent-a); }

.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 5px; background: var(--frame); border: 1px solid var(--border-2); color: var(--sub); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ------------------------------------------------------------------- логотип */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -0.03em; color: var(--text); }
.logo svg { width: 22px; height: 22px; }
.logo .thin { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-left: 2px; }
.logo-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text);
  background: var(--frame); border: 1px solid var(--border-2); }
.logo-tile svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- таблицы */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.035); vertical-align: middle; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: rgba(124,92,255,.04); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 12.5px;
  background: var(--accent-a); color: var(--accent-2); border: 1px solid rgba(124,92,255,.28); position: relative; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--card); }
.empty { padding: 48px 20px; text-align: center; color: var(--dim); display: grid; gap: 10px; justify-items: center; }
.empty .ico { width: 28px; height: 28px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--dim); font-size: 12.5px; }
.pager .btns { display: flex; gap: 6px; }

/* --------------------------------------------------------------- демо-плашка */
.demo-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 16px; font-size: 12.5px; color: var(--yellow);
  background: repeating-linear-gradient(-45deg, rgba(242,196,90,.09) 0 10px, rgba(242,196,90,.05) 10px 20px);
  border-bottom: 1px solid rgba(242,196,90,.25);
}
.demo-bar b { font-weight: 600; }
.demo-bar .seg { background: rgba(0,0,0,.35); }
.demo-bar .seg button { height: 24px; font-size: 12px; padding: 0 9px; }
.demo-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em;
  color: var(--yellow); border: 1px dashed rgba(242,196,90,.5); text-transform: uppercase; }

/* ------------------------------------------------------------- тосты/модалки */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; font-size: 13.5px; }
.toast .ico { margin-top: 1px; color: var(--accent-2); }
.toast.ok .ico { color: var(--green); } .toast.err .ico { color: var(--red); } .toast.warn .ico { color: var(--yellow); }
.toast.out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px); } }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(4,4,8,.66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card);
  border: 1px solid var(--border-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { width: min(620px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 0; }
.modal-head h3 { font-size: 17px; }
.modal-head p { color: var(--sub); font-size: 13px; margin-top: 4px; }
.modal-body { padding: 18px 22px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 22px; }

.drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(4,4,8,.55); backdrop-filter: blur(3px); animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(460px, 100vw); background: var(--bg-2);
  border-left: 1px solid var(--border-2); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow: auto; padding: 20px; display: grid; gap: 18px; align-content: start; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; font-size: 13.5px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.action-list { display: grid; gap: 8px; }
.action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; text-align: left; width: 100%; transition: .15s; }
.action:hover:not([disabled]) { border-color: var(--border-2); background: var(--card-2); }
.action .t { font-weight: 600; font-size: 13.5px; }
.action .d { font-size: 12px; color: var(--dim); }
.action .grow { flex: 1; min-width: 0; }
.action.danger .t { color: var(--red); }
.action[disabled] { cursor: not-allowed; opacity: .55; }
.lock-note { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); }

/* ------------------------------------------------------------- подсказки */
.hint { padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(242,196,90,.35); background: rgba(242,196,90,.05); font-size: 12.5px; color: var(--sub); display: grid; gap: 6px; }
.hint b { color: var(--yellow); font-weight: 600; }
.hint .row { display: flex; gap: 8px; flex-wrap: wrap; }
.hint button { border: 1px solid var(--border-2); background: var(--frame); color: var(--text); border-radius: 7px; padding: 3px 9px; font-size: 12px; cursor: pointer; font-family: var(--mono); }
.hint button:hover { border-color: #3a3a50; }
.field .seg { justify-self: start; }

/* -------------------------------------------------------- макет приложения */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px;
  background: var(--bg-2); border-right: 1px solid var(--border); }
.demo-on .side { top: var(--demo-h, 37px); height: calc(100vh - var(--demo-h, 37px)); }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 20px; }
.side-brand .t { font-weight: 750; font-size: 16px; letter-spacing: -.02em; }
.side-brand .s { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.side-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 16px 12px 7px; font-weight: 500; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--dim); cursor: pointer; transition: color .15s, background .15s; font-weight: 550; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { color: var(--sub); background: rgba(255,255,255,.03); }
.nav-item.on { color: var(--text); background: var(--accent-a); }
.nav-item.on .ico { color: var(--accent-2); }
.nav-item.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 500; }
.side-foot { margin-top: auto; }
.me-card { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.me-card .n { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .grow { flex: 1; min-width: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 20px 30px; border-bottom: 1px solid var(--border); min-height: 76px; }
.topbar h1 { font-size: 24px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.topbar .crumb { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 26px 30px 48px; display: grid; gap: 18px; align-content: start; width: 100%; }

.grid { display: grid; gap: 16px; }
.content > *, .grid > * { min-width: 0; }   /* широкие таблицы прокручиваются внутри карточки, а не всей страницей */
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side-r { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.stat { padding: 18px 20px; display: grid; gap: 6px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-size: 12.5px; }
.stat .top .ico { color: var(--accent-2); }
.stat .v { font-size: 30px; font-weight: 750; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .delta { font-family: var(--mono); font-size: 11.5px; color: var(--green); }
.stat .delta.neg { color: var(--red); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input-wrap { flex: 1; min-width: 200px; }
.toolbar .input { height: 38px; }
.toolbar .select { width: auto; min-width: 150px; height: 38px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bars .b { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(124,92,255,.18)); min-height: 3px; position: relative; }
.bars .b:hover { background: linear-gradient(180deg, var(--accent-2), rgba(124,92,255,.35)); }
.bars .b span { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--sub); opacity: 0; transition: .15s; white-space: nowrap; }
.bars .b:hover span { opacity: 1; }
.bars-x { display: flex; gap: 6px; margin-top: 8px; }
.bars-x span { flex: 1; text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

.subscription-time { flex: 1 1 230px; min-width: 0; padding: 12px 0; }
.subscription-time .eyebrow { font-size: 11px; }
.subscription-time-value { margin-top: 10px; font-size: clamp(24px, 1.7vw, 32px); font-weight: 750; letter-spacing: -.04em; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.subscription-progress { margin-top: 16px; max-width: 360px; }
.subscription-progress > i { width: calc(var(--p) * 1%); }

.progress { height: 6px; border-radius: 99px; background: var(--frame); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-3), var(--accent-2)); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }

.key-box { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--panel); border: 1px dashed var(--border-2); font-family: var(--mono); font-size: 13px; }
.key-box .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy-btn { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; }
.copy-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.hide { display: none !important; }

/* ------------------------------------------------------------- адаптив */
@media (max-width: 1100px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.side-r { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 75; left: 0; top: 0; height: 100vh; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .demo-on .side { top: 0; height: 100vh; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 14px 16px; min-height: 64px; }
  .content { padding: 16px 16px 40px; }
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; }
  .toolbar .select { flex: 1; }
  .demo-bar { font-size: 11.5px; }
  .grid.c4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 24px; }
  .topbar h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------- свечение за курсором (glow.js) */
.glow-layer { position: fixed; left: 0; top: 0; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.23), transparent 66%); pointer-events: none; z-index: 0; opacity: 0;
  transition: opacity .45s; will-change: transform; }
body.glow-on .glow-layer { opacity: 1; }
.card, .tile, .step, .plan, .band, .fn-tile { transition: border-color .25s, background-color .25s; }
.card.is-lit, .tile.is-lit, .step.is-lit, .plan.is-lit, .band.is-lit, .fn-tile.is-lit, .hero-shot .frame.is-lit {
  background-image: radial-gradient(circle var(--glow-r, 440px) at var(--gx, 50%) var(--gy, 50%), rgba(124,92,255,.15), transparent 70%);
  border-color: rgba(124,92,255,.42); }


@media (prefers-reduced-motion: reduce) { .glow-layer { display: none; } }
