/* ==========================================================================
   Lore Project — общий стиль сайта, ЛК и панели
   Монохром: почти чёрный фон, белый акцент, тонкие обводки, Inter
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.ttf") format("truetype");  font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.ttf") format("truetype");   font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.ttf") format("truetype");     font-weight: 700; font-display: swap; }

:root {
  --bg:        #0a0a0c;
  --bg-2:      #0d0d10;
  --panel:     #0e0e11;
  --card:      #121215;
  --card-2:    #16161a;
  --frame:     #1a1a1e;
  --hover:     #202025;
  --border:    #202025;
  --border-2:  #2a2a30;
  --text:      #ededf1;
  --sub:       #a3a3ad;
  --dim:       #6b6b75;
  --accent:    #f5f5f7;
  --on-accent: #0a0a0c;
  --green:     #4ade80;
  --yellow:    #fac754;
  --red:       #f76166;
  --blue:      #8cbcff;

  --r-sm: 8px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow:    0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.7);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 80px -20px rgba(0,0,0,.85);
  --glow:      0 0 0 1px rgba(255,255,255,.08), 0 8px 24px -6px rgba(255,255,255,.18);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", 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: 500 14px/1.5 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: rgba(255,255,255,.18); }
:focus-visible { outline: 2px solid rgba(255,255,255,.55); outline-offset: 2px; border-radius: 6px; }

.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; 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: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(34px, 6vw, 60px); letter-spacing: -0.035em; }
h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.03em; }
h3 { font-size: 17px; }
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-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 600; }
.grad-text { background: linear-gradient(180deg, #fff 30%, #8a8a94); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------- кнопки */
.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, #1d1d22, #16161a);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
  font-weight: 600; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s, opacity .15s;
}
.btn:hover { background: linear-gradient(180deg, #232329, #1a1a1f); border-color: #34343b; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, #ffffff, #d9d9de);
  color: var(--on-accent); border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 24px -8px rgba(255,255,255,.35);
}
.btn.primary:hover { background: linear-gradient(180deg, #ffffff, #e6e6ea); box-shadow: 0 1px 0 #fff inset, 0 10px 30px -8px rgba(255,255,255,.45); }
.btn.ghost  { background: transparent; border-color: transparent; box-shadow: none; color: var(--sub); }
.btn.ghost:hover { background: rgba(255,255,255,.04); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: rgba(247,97,102,.4); background: rgba(247,97,102,.08); }
.btn.sm  { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg  { --h: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.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,.18); border-top-color: currentColor; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------- формы */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 12.5px; color: var(--sub); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #55555e; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-2); }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(255,255,255,.35); box-shadow: 0 0 0 3px rgba(255,255,255,.06); background: #111114; }
.input.mono { font-family: var(--mono); letter-spacing: .02em; }
.input-wrap { position: relative; }
.input-wrap > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.select { appearance: none; padding-right: 34px; 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='%23a3a3ad' 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 10px 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: 16px; height: 16px; margin: 0; border-radius: 4px; 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 var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); }

.switch { position: relative; width: 38px; 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: linear-gradient(180deg, #fff, #d6d6db); border-color: transparent; box-shadow: 0 0 14px -2px rgba(255,255,255,.35); }
.switch input:checked::after { left: 19px; background: var(--on-accent); }
.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: 11px; }
.seg button { height: 30px; padding: 0 12px; border: 0; background: transparent; color: var(--dim); border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; transition: .15s; }
.seg button:hover { color: var(--sub); }
.seg button.on { background: var(--hover); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }

/* ---------------------------------------------------------------- карточки */
.card {
  background: linear-gradient(180deg, #131316, #0f0f12);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); position: relative;
}
.card::before { /* блик по верхней кромке */
  content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); pointer-events: none;
}
.card-pad { padding: 20px; }
.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: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--frame); border: 1px solid var(--border); color: var(--sub);
}
.badge-ico.on { background: linear-gradient(180deg, #fff, #d4d4d9); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(255,255,255,.4); }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--sub); background: rgba(255,255,255,.04); 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(74,222,128,.08);  border-color: rgba(74,222,128,.22); }
.pill.yellow { color: var(--yellow); background: rgba(250,199,84,.08);  border-color: rgba(250,199,84,.22); }
.pill.red    { color: var(--red);    background: rgba(247,97,102,.08);  border-color: rgba(247,97,102,.22); }
.pill.blue   { color: var(--blue);   background: rgba(140,188,255,.08); border-color: rgba(140,188,255,.22); }
.pill.white  { color: var(--text);   background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }

.role { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  background: var(--frame); border: 1px solid var(--border-2); color: var(--sub); }
.role.admin   { background: linear-gradient(180deg, #fff, #d4d4d9); color: var(--on-accent); border-color: transparent; }
.role.manager { color: var(--blue); border-color: rgba(140,188,255,.3); background: rgba(140,188,255,.08); }

.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: linear-gradient(90deg, transparent, var(--border-2), transparent); border: 0; margin: 0; }

/* ------------------------------------------------------------------- логотип */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.logo svg { width: 22px; height: 22px; }
.logo .thin { color: var(--dim); }
.logo-tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(180deg, #212126, #121215); border: 1px solid #2c2c33; box-shadow: 0 8px 24px -10px rgba(255,255,255,.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-weight: 500; font-size: 12px; color: var(--dim); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: rgba(255,255,255,.025); }
.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: 600; font-size: 12.5px;
  background: linear-gradient(180deg, #2a2a30, #18181c); border: 1px solid var(--border-2); 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(250,199,84,.09) 0 10px, rgba(250,199,84,.05) 10px 20px);
  border-bottom: 1px solid rgba(250,199,84,.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-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--yellow); border: 1px dashed rgba(250,199,84,.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: 12px 14px; border-radius: 12px; background: #141417; 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; }
.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,6,.62); 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: linear-gradient(180deg, #151518, #0f0f12);
  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: 20px 20px 0; }
.modal-head h3 { font-size: 16px; }
.modal-head p { color: var(--sub); font-size: 13px; margin-top: 4px; }
.modal-body { padding: 18px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }

.drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(4,4,6,.5); backdrop-filter: blur(3px); animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(460px, 100vw); background: linear-gradient(180deg, #131316, #0d0d10);
  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: #121215; }
.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(250,199,84,.35); background: rgba(250,199,84,.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: #3a3a42; }
.field .seg { justify-self: start; }

/* -------------------------------------------------------- макет приложения */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px;
  background: linear-gradient(180deg, #0f0f12, #0b0b0d); 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 18px; }
.side-brand .t { font-weight: 600; font-size: 15px; }
.side-brand .s { font-size: 11.5px; color: var(--dim); }
.side-group { font-size: 11.5px; color: var(--dim); padding: 14px 10px 6px; font-weight: 500; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--dim); cursor: pointer; transition: color .15s, background .15s; font-weight: 500; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { color: var(--sub); background: rgba(255,255,255,.025); }
.nav-item.on { color: var(--text); font-weight: 600; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,0)); }
.nav-item.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px rgba(255,255,255,.6); }
.nav-item .count { margin-left: auto; font-size: 11.5px; 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: linear-gradient(180deg, #151518, #0f0f12); border: 1px solid var(--border); }
.me-card .n { font-weight: 600; 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: 18px 28px; border-bottom: 1px solid var(--border); min-height: 72px;
  background: radial-gradient(600px 120px at 30% -40px, rgba(255,255,255,.05), transparent); }
.topbar h1 { font-size: 21px; letter-spacing: -0.02em; }
.topbar .crumb { font-size: 12.5px; color: var(--dim); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; display: grid; gap: 18px; align-content: start; max-width: 1240px; 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: 16px 18px; display: grid; gap: 4px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-size: 12.5px; }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 12px; 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 .select { width: auto; min-width: 150px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bars .b { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.12)); min-height: 3px; position: relative; }
.bars .b:hover { background: linear-gradient(180deg, #fff, rgba(255,255,255,.3)); }
.bars .b span { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); 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-size: 11px; color: var(--dim); }

.ring { --p: 50; --size: 128px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--frame) 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: linear-gradient(180deg, #141417, #101013); }
.ring > div { position: relative; z-index: 1; text-align: center; }
.ring .v { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ring .l { font-size: 11.5px; color: var(--dim); margin-top: 4px; }

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

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.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: 10px 12px; 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: 270px; 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: 22px; }
  .topbar h1 { font-size: 18px; }
}
