/* =====================================================================
   RageLand | PolitOne — STAFF PANEL v2
   Полностью самостоятельный стиль (style.css / politone.css не нужны)
   ===================================================================== */
:root, [data-theme="light"] {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-h: "Plus Jakarta Sans", "Inter", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #eef4f7;
  --bg-grad: radial-gradient(900px 500px at 85% -10%, rgba(84,218,244,.28), transparent 60%),
             radial-gradient(700px 480px at -10% 110%, rgba(99,102,241,.14), transparent 60%);
  --card: #ffffff;
  --card-2: #f5fafc;
  --line: #e0eaee;
  --line-2: #cfdde3;
  --text: #0f2229;
  --muted: #62797f;
  --dim: #94a7ad;

  --brand: #54daf4;
  --brand-2: #0c8ba2;
  --brand-3: #0a6c80;
  --brand-soft: rgba(84,218,244,.16);
  --brand-glow: rgba(84,218,244,.38);

  --ok: #0f9f6e;     --ok-bg: #dcfbee;
  --warn: #b7791f;   --warn-bg: #fdf1d3;
  --bad: #d23a5e;    --bad-bg: #ffe6ec;
  --info: #4f46e5;   --info-bg: #e8e8ff;

  --side-bg: linear-gradient(185deg, #0b1c24 0%, #0a2a36 55%, #0b3a49 100%);
  --side-text: #b8d3dc;
  --side-dim: #6f929e;

  --shadow-sm: 0 1px 2px rgba(15,34,41,.05), 0 2px 8px rgba(15,34,41,.04);
  --shadow: 0 10px 30px rgba(15,60,75,.08);
  --shadow-lg: 0 24px 60px rgba(8,40,52,.22);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070d11;
  --bg-grad: radial-gradient(900px 500px at 85% -10%, rgba(84,218,244,.14), transparent 60%),
             radial-gradient(700px 480px at -10% 110%, rgba(99,102,241,.12), transparent 60%);
  --card: #0e171d;
  --card-2: #121f27;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #eaf3f6;
  --muted: #8aa3ad;
  --dim: #56707a;
  --brand-2: #3fd0ec;
  --brand-3: #7ee4f7;
  --brand-soft: rgba(84,218,244,.13);
  --ok: #34d399;   --ok-bg: rgba(52,211,153,.13);
  --warn: #fbbf24; --warn-bg: rgba(251,191,36,.13);
  --bad: #fb7185;  --bad-bg: rgba(251,113,133,.14);
  --info: #a5b4fc; --info-bg: rgba(129,140,248,.16);
  --side-bg: linear-gradient(185deg, #060c10 0%, #08161d 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.adm {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg); background-image: var(--bg-grad);
  background-attachment: fixed; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
.adm a { color: inherit; text-decoration: none; }
.adm button { font-family: inherit; cursor: pointer; }
.adm code { font-family: var(--mono); font-size: .88em; background: var(--brand-soft); color: var(--brand-3); padding: 2px 7px; border-radius: 7px; }
.adm ::selection { background: var(--brand); color: #04222a; }
.adm ::-webkit-scrollbar { width: 10px; height: 10px; }
.adm ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
.adm svg { flex-shrink: 0; }

/* ---------- LAYOUT ---------- */
.shell { display: grid; grid-template-columns: 268px minmax(0,1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
.shell.collapsed { grid-template-columns: 82px minmax(0,1fr); }

.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--side-bg); color: var(--side-text); padding: 20px 14px; z-index: 60;
  border-right: 1px solid rgba(255,255,255,.05); overflow: hidden;
}
.side::before { content: ""; position: absolute; width: 280px; height: 280px; right: -140px; top: -90px;
  background: radial-gradient(circle, rgba(84,218,244,.35), transparent 70%); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; position: relative; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #54daf4, #1796b3); color: #03242c; font: 800 20px var(--font-h);
  box-shadow: 0 8px 22px rgba(84,218,244,.45), inset 0 1px 0 rgba(255,255,255,.45); position: relative; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand-name { font: 800 17px var(--font-h); color: #fff; letter-spacing: .02em; line-height: 1.1; white-space: nowrap; }
.brand-name span { color: var(--brand); }
.brand-sub { font-size: 11px; color: var(--side-dim); font-weight: 600; white-space: nowrap; }

.side-scroll { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.nav-label { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--side-dim); padding: 16px 12px 8px; white-space: nowrap; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 3px; border-radius: 13px;
  font-weight: 650; font-size: 13.5px; color: var(--side-text); position: relative; transition: .18s; white-space: nowrap;
}
.nav a svg { opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(84,218,244,.22), rgba(84,218,244,.06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(84,218,244,.28); }
.nav a.on svg { color: var(--brand); opacity: 1; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); box-shadow: 0 0 14px var(--brand); }
.nav .cnt { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.1); color: #d7edf3; }
.nav .cnt.hot { background: #fb7185; color: #fff; }
.nav .pro { margin-left: auto; font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--brand); color: #04222a; letter-spacing: .06em; }
.shell.collapsed .brand-txt, .shell.collapsed .nav a span, .shell.collapsed .nav .cnt, .shell.collapsed .nav .pro,
.shell.collapsed .nav-label, .shell.collapsed .me-txt { display: none; }
.shell.collapsed .nav a { justify-content: center; padding: 12px; }
.shell.collapsed .nav a.on::before { left: -14px; }
.shell.collapsed .me { justify-content: center; }

.me { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 15px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.07); margin-top: 12px; position: relative; }
.me img { width: 36px; height: 36px; border-radius: 10px; image-rendering: pixelated; background: #0b2630; }
.me-name { font-weight: 750; color: #fff; font-size: 13.5px; line-height: 1.2; }
.me-role { margin-top: 3px; }

/* ---------- TOPBAR ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--line);
  background: var(--card); color: var(--text); transition: .18s; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-2); transform: translateY(-1px); }
.burger { display: none; }
.crumb { font: 800 19px var(--font-h); letter-spacing: -.01em; white-space: nowrap; }
.crumb small { display: block; font: 600 12px var(--font); color: var(--muted); letter-spacing: 0; }
.top-spacer { flex: 1; }
.cmd-btn {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; min-width: 240px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; box-shadow: var(--shadow-sm); transition: .18s;
}
.cmd-btn:hover { border-color: var(--brand); color: var(--text); }
.cmd-btn kbd { margin-left: auto; font: 700 11px var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.theme-ico .sun { display: none; } [data-theme="dark"] .theme-ico .sun { display: block; } [data-theme="dark"] .theme-ico .moon { display: none; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 12px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.live-dot.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.live-dot.on i { background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

.page { padding: 26px 28px 80px; max-width: 1560px; width: 100%; margin: 0 auto; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font: 800 28px var(--font-h); letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- BUTTONS / BADGES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; font-size: 13px; transition: .18s; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--brand); color: var(--brand-2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #5fe0f7, #1fa6c4); color: #032830; border-color: transparent; box-shadow: 0 8px 22px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.primary:hover { color: #032830; filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 12px 28px var(--brand-glow); }
.btn.danger { color: var(--bad); background: var(--bad-bg); border-color: transparent; box-shadow: none; }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-3); } .badge.mute { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.role { font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: .06em; text-transform: uppercase; display: inline-block; }
.role.superadmin { background: linear-gradient(90deg,#54daf4,#7c8cff); color: #04222a; }
.role.admin { background: #fee2e2; color: #dc2626; } .role.support { background: #e0f2fe; color: #0284c7; } .role.moderator { background: #fef3c7; color: #d97706; }

/* ---------- CARDS / GRIDS ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; position: relative; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h3 { margin: 0; font: 800 16px var(--font-h); display: flex; align-items: center; gap: 10px; }
.card-h h3 svg { color: var(--brand-2); }
.card-h .sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); }
.mb { margin-bottom: 18px; }

.kpi { padding: 20px 22px; overflow: hidden; transition: .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--k, var(--brand)) 0%, transparent 70%); opacity: .22; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.kpi-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--k, var(--brand)) 18%, transparent); color: var(--k, var(--brand-2)); }
.kpi-val { font: 800 30px var(--font-h); letter-spacing: -.02em; margin-top: 12px; line-height: 1.1; }
.kpi-val small { font-size: 16px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.kpi-sub { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 800; padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.delta.up { background: var(--ok-bg); color: var(--ok); } .delta.down { background: var(--bad-bg); color: var(--bad); } .delta.flat { background: var(--card-2); color: var(--muted); }
.spark { position: absolute; right: 14px; bottom: 12px; opacity: .9; }

/* ---------- CHARTS ---------- */
.chart { width: 100%; height: 250px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 3 5; }
.chart .ax { fill: var(--dim); font: 600 10.5px var(--font); }
.chart .bar { fill: url(#gBar); transition: .2s; } .chart .bar:hover { filter: brightness(1.12); }
.chart-tip { position: absolute; pointer-events: none; background: #0b1c24; color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-lg); transform: translate(-50%, -110%); opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 5; }
.chart-tip small { display: block; color: #8fc9d6; font-weight: 600; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; position: relative; flex-shrink: 0; }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 800 26px var(--font-h); line-height: 1; }
.donut-c small { display: block; font: 700 11px var(--font); color: var(--muted); margin-top: 4px; }
.legend { display: grid; gap: 9px; flex: 1; min-width: 150px; }
.legend div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 650; }
.legend i { width: 10px; height: 10px; border-radius: 4px; }
.legend b { margin-left: auto; font-weight: 800; }

.rank { display: grid; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; }
.rank-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 800 12px var(--font-h); background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.rank-row:nth-child(1) .rank-n { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #5a3a00; border: 0; }
.rank-row:nth-child(2) .rank-n { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color: #2b3138; border: 0; }
.rank-row:nth-child(3) .rank-n { background: linear-gradient(135deg,#fdba74,#c2410c); color: #fff; border: 0; }
.rank-t { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.rank-t span:last-child { color: var(--muted); font-weight: 600; }
.bar-bg { height: 7px; background: var(--card-2); border-radius: 9px; margin-top: 7px; overflow: hidden; border: 1px solid var(--line); }
.bar-bg i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #54daf4, #6d7cff); }
.rank-v { font-weight: 800; font-size: 13px; white-space: nowrap; }

.feed { display: grid; gap: 4px; }
.feed-i { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 13px; transition: .15s; }
.feed-i:hover { background: var(--card-2); }
.feed-i img { width: 34px; height: 34px; border-radius: 9px; image-rendering: pixelated; background: var(--card-2); }
.feed-i .t { font-weight: 700; font-size: 13px; line-height: 1.25; } .feed-i .s { font-size: 11.5px; color: var(--muted); }
.feed-i .r { margin-left: auto; text-align: right; font-weight: 800; font-size: 13px; white-space: nowrap; }

.health { display: grid; gap: 10px; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.hrow .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hrow .dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); } .hrow .dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); } .hrow .dot.mute { background: var(--dim); box-shadow: 0 0 0 4px var(--card); }
.hrow b { font-size: 13px; } .hrow small { display: block; color: var(--muted); font-size: 11.5px; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.quick a, .quick button { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); font-weight: 700; font-size: 12.5px; color: var(--text); text-align: left; transition: .18s; }
.quick a:hover, .quick button:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick svg { color: var(--brand-2); }

/* ---------- FORMS ---------- */
.fld { display: block; min-width: 0; }
.fld > span, .lbl { display: block; font-size: 12px; font-weight: 750; color: var(--muted); margin-bottom: 7px; }
.fld > small, .hint { display: block; font-size: 11.5px; color: var(--dim); margin-top: 6px; line-height: 1.45; }
.inp, .adm select, .adm textarea, .adm input[type=text], .adm input[type=number], .adm input[type=password], .adm input[type=email], .adm input[type=url], .adm input[type=search] {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  font: 500 14px var(--font); outline: none; transition: .16s; appearance: none; -webkit-appearance: none;
}
.adm select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2394a7ad' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.adm textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: 12.5px; }
.adm input:focus, .adm select:focus, .adm textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--card); }
.adm input::placeholder, .adm textarea::placeholder { color: var(--dim); }
.adm input[type=file] { display: none; }
.f-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.f-grid.s { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pw { position: relative; } .pw input { padding-right: 46px; }
.pw button { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.pw button:hover { background: var(--brand-soft); color: var(--brand-2); }
.input-ico { position: relative; } .input-ico > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-ico input { padding-left: 40px !important; }

.sw { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 18px; transition: .15s; user-select: none; }
.sw:hover { border-color: var(--line-2); }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .tg { width: 44px; height: 25px; border-radius: 99px; background: var(--line-2); position: relative; transition: .2s; flex-shrink: 0; }
.sw .tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.3); transition: .2s; }
.sw input:checked + .tg { background: linear-gradient(135deg, #3ccbe8, #1796b3); }
.sw input:checked + .tg::after { transform: translateX(19px); }
.sw input:focus-visible + .tg { box-shadow: 0 0 0 4px var(--brand-soft); }
.sw b { font-size: 13.5px; font-weight: 700; } .sw small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.sw.inline { margin: 0; padding: 0; background: none; border: 0; }

.drop { border: 2px dashed var(--line-2); border-radius: 16px; padding: 26px; text-align: center; cursor: pointer; transition: .18s; background: var(--card-2); position: relative; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop svg { color: var(--brand-2); margin-bottom: 8px; } .drop b { display: block; font-size: 13.5px; } .drop small { color: var(--muted); font-size: 11.5px; }
.drop img.pv { display: block; max-height: 120px; margin: 0 auto 10px; border-radius: 12px; object-fit: contain; }

/* ---------- TABLES ---------- */
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tools .grow { flex: 1; min-width: 220px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 12.5px; transition: .15s; }
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-3); }
.chip em { font-style: normal; font-size: 11px; background: var(--card-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.chip.on em { background: var(--brand); color: #04222a; border-color: transparent; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--card-2); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--brand-2); }
.tbl th.sortable::after { content: " ↕"; opacity: .35; } .tbl th.asc::after { content: " ↑"; opacity: 1; color: var(--brand-2); } .tbl th.desc::after { content: " ↓"; opacity: 1; color: var(--brand-2); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.row:hover td { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.tbl tr.edit td { background: var(--card-2); padding: 18px 20px; }
.tbl .num { font-weight: 800; white-space: nowrap; } .tbl .sub { font-size: 11px; color: var(--muted); font-weight: 600; }
.pl { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; } .pl img { width: 24px; height: 24px; border-radius: 6px; image-rendering: pixelated; }
.copy { cursor: copy; border: 0; background: var(--brand-soft); color: var(--brand-3); font: 700 12px var(--mono); padding: 3px 9px; border-radius: 8px; transition: .15s; }
.copy:hover { background: var(--brand); color: #04222a; }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { color: var(--dim); margin-bottom: 8px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; gap: 10px; }

/* ---------- PRODUCTS ---------- */
.prod-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: .2s; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.pcard-img { height: 120px; display: grid; place-items: center; position: relative; background: linear-gradient(135deg, var(--ac1, #54daf4), var(--ac2, #1796b3)); }
.pcard-img img { max-height: 92px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); }
.pcard-img .ph { font: 800 30px var(--font-h); color: rgba(255,255,255,.85); text-shadow: 0 3px 12px rgba(0,0,0,.25); }
.pcard-img .bd { position: absolute; left: 10px; top: 10px; font-size: 10px; font-weight: 800; background: rgba(255,255,255,.92); color: #0a3b47; padding: 3px 9px; border-radius: 99px; }
.pcard-img .id { position: absolute; right: 10px; top: 10px; font: 700 11px var(--mono); color: rgba(255,255,255,.8); }
.pcard-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-b h4 { margin: 0; font: 800 15px var(--font-h); } .pcard-b p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.price { font: 800 18px var(--font-h); } .price s { font: 600 12px var(--font); color: var(--dim); margin-left: 6px; }
.pcard-act { display: flex; gap: 6px; margin-top: 10px; }
.pcard-act .btn { flex: 1; }
.ac-cyan { --ac1: #54daf4; --ac2: #1688a6; } .ac-violet { --ac1: #a78bfa; --ac2: #6d28d9; } .ac-orange { --ac1: #fdba74; --ac2: #ea580c; }
.ac-blue { --ac1: #60a5fa; --ac2: #1d4ed8; } .ac-lime { --ac1: #bef264; --ac2: #4d9a0c; } .ac-rose { --ac1: #fda4af; --ac2: #e11d48; } .ac-gold { --ac1: #fde68a; --ac2: #d9930d; }
.editor { position: sticky; top: 86px; }
.editor-wrap { max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px; }
.editor-wrap .fld { margin-bottom: 14px; }
.product-import-file { display: block; max-width: 100%; font: inherit; color: var(--text); }
.product-import-file::file-selector-button {
  margin-inline-end: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.preview { margin-bottom: 18px; }
.preview .pcard { pointer-events: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { cursor: pointer; } .swatches input { display: none; }
.swatches i { display: block; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--ac1), var(--ac2)); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line-2); transition: .15s; }
.swatches input:checked + i { box-shadow: 0 0 0 2.5px var(--brand); transform: scale(1.1); }

/* ---------- STAFF ---------- */
.staff-list { display: grid; gap: 12px; }
.staff-i { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); transition: .15s; }
.staff-i:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.staff-i.owner { background: linear-gradient(90deg, var(--brand-soft), transparent); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.staff-i img { width: 42px; height: 42px; border-radius: 12px; image-rendering: pixelated; background: var(--card-2); }
.staff-i b { font-size: 14.5px; } .staff-i small { display: block; color: var(--muted); font-size: 11.5px; }
.staff-i .end { margin-left: auto; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-pick label { cursor: pointer; } .role-pick input { display: none; }
.role-pick div { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; transition: .15s; background: var(--card-2); height: 100%; }
.role-pick b { display: block; font-size: 13px; margin-bottom: 4px; } .role-pick small { color: var(--muted); font-size: 11.5px; line-height: 1.4; display: block; }
.role-pick input:checked + div { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- SETTINGS ---------- */
.set-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 20px; align-items: start; }
.set-nav { position: sticky; top: 86px; display: grid; gap: 4px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--muted); transition: .15s; }
.set-nav a:hover { background: var(--card); color: var(--text); }
.set-nav a.on { background: var(--card); color: var(--brand-3); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.set-sec { scroll-margin-top: 90px; margin-bottom: 18px; }
.set-sec .card-h h3 .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; }
.cmd-hint { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmd-hint code { cursor: pointer; } .cmd-hint code:hover { background: var(--brand); color: #04222a; }
.savebar { position: sticky; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 22px; border-radius: 18px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); transform: translateY(0); transition: .25s; }
.savebar .st { font-weight: 700; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.savebar .st i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.savebar.dirty .st { color: var(--warn); } .savebar.dirty .st i { background: var(--warn); animation: pulse 1.6s infinite; }
.savebar .btn { margin-left: auto; }

/* ---------- PROMO ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.coupon { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; overflow: hidden; transition: .2s; box-shadow: var(--shadow-sm); }
.coupon:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.coupon::before, .coupon::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); top: 58px; }
.coupon::before { left: -11px; } .coupon::after { right: -11px; }
.coupon .big { font: 800 34px var(--font-h); background: linear-gradient(135deg, #54daf4, #6d7cff); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.coupon.off { opacity: .6; filter: grayscale(.6); }
.coupon .cd { margin-top: 20px; padding-top: 14px; border-top: 2px dashed var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coupon .cd small { color: var(--muted); font-size: 11.5px; display: block; }

/* ---------- ALERTS / TOAST / MODAL ---------- */
.toasts { position: fixed; right: 22px; top: 22px; z-index: 300; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: tin .35s cubic-bezier(.2,.9,.3,1.2) both; position: relative; overflow: hidden; font-weight: 650; font-size: 13px; }
.toast .ti { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.toast.ok .ti { background: var(--ok-bg); color: var(--ok); } .toast.bad .ti { background: var(--bad-bg); color: var(--bad); } .toast.info .ti { background: var(--brand-soft); color: var(--brand-2); }
.toast .tx { flex: 1; padding-top: 4px; word-break: break-word; }
.toast .x { border: 0; background: none; color: var(--dim); font-size: 18px; line-height: 1; padding: 2px 4px; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand); animation: tbar var(--d, 6s) linear forwards; }
.toast.ok::after { background: var(--ok); } .toast.bad::after { background: var(--bad); }
.toast.out { animation: tout .25s ease forwards; }
@keyframes tin { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateX(40px); } }
@keyframes tbar { from { width: 100%; } to { width: 0; } }

.overlay { position: fixed; inset: 0; background: rgba(4,16,22,.55); backdrop-filter: blur(6px); z-index: 200; display: none; }
.overlay.show { display: block; animation: fade .15s; } @keyframes fade { from { opacity: 0; } }
.palette { position: fixed; left: 50%; top: 14vh; transform: translateX(-50%); width: min(620px, calc(100vw - 28px)); z-index: 210; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
.palette.show { display: block; animation: rise .18s ease; }
.palette input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; height: 58px !important; font-size: 16px !important; padding: 0 22px !important; background: transparent !important; box-shadow: none !important; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.pal-i { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-weight: 650; font-size: 13.5px; cursor: pointer; }
.pal-i svg { color: var(--brand-2); } .pal-i small { margin-left: auto; color: var(--dim); font-weight: 600; }
.pal-i.sel { background: var(--brand-soft); color: var(--brand-3); }
.pal-sec { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); padding: 10px 14px 4px; }
.pal-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; gap: 16px; background: var(--card-2); }
.pal-foot kbd { font: 700 10.5px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--card); }

.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 28px)); z-index: 220; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); display: none; }
.modal.show { display: block; animation: rise .2s; } .modal h3 { margin: 0 0 6px; font: 800 20px var(--font-h); } .modal p { color: var(--muted); margin: 0 0 20px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }

.live-bar { display: none; }

/* ---------- LOGIN ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 20px; overflow: hidden; }
body.login::before, body.login::after { content: ""; position: fixed; border-radius: 50%; filter: blur(90px); opacity: .55; z-index: 0; animation: float 14s ease-in-out infinite; }
body.login::before { width: 480px; height: 480px; background: #54daf4; left: -120px; top: -120px; }
body.login::after { width: 420px; height: 420px; background: #6d7cff; right: -100px; bottom: -120px; animation-delay: -7s; }
@keyframes float { 50% { transform: translate(50px, 40px) scale(1.12); } }
.login-card { position: relative; z-index: 1; width: min(440px, 100%); background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line-2); border-radius: 28px; padding: 38px 34px 30px; box-shadow: var(--shadow-lg); animation: rise .5s ease both; }
.login-card .brand-mark { width: 62px; height: 62px; border-radius: 19px; font-size: 30px; margin: 0 auto 18px; }
.login-card h1 { margin: 0; text-align: center; font: 800 26px var(--font-h); letter-spacing: -.02em; }
.login-card .sub { text-align: center; color: var(--muted); margin: 6px 0 26px; font-size: 13.5px; }
.login-card .fld { margin-bottom: 16px; }
.login-card .alert { background: var(--bad-bg); color: var(--bad); border-radius: 13px; padding: 12px 14px; font-weight: 700; font-size: 13px; margin-bottom: 18px; text-align: center; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.login-foot { display: flex; justify-content: space-between; margin-top: 20px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.login-foot a:hover { color: var(--brand-2); }
.login-theme { position: fixed; right: 20px; top: 20px; z-index: 5; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-main { grid-template-columns: 1fr; } .prod-layout { grid-template-columns: 1fr; } .editor { position: static; } .editor-wrap { max-height: none; } }
@media (max-width: 1000px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 284px; transform: translateX(-102%); transition: transform .28s ease; box-shadow: var(--shadow-lg); }
  .shell.open .side { transform: none; }
  .shell.collapsed .brand-txt, .shell.collapsed .nav a span, .shell.collapsed .nav .cnt, .shell.collapsed .nav .pro, .shell.collapsed .nav-label, .shell.collapsed .me-txt { display: revert; }
  .shell.collapsed .nav a { justify-content: flex-start; padding: 10px 12px; }
  .burger { display: inline-grid; } .collapse-btn { display: none; }
  .top { padding: 12px 16px; } .page { padding: 20px 16px 70px; }
  .cmd-btn { min-width: 0; } .cmd-btn span, .cmd-btn kbd { display: none; } .cmd-btn { width: 40px; padding: 0; justify-content: center; }
  .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 6px; } .set-nav a { white-space: nowrap; }
  .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; } .role-pick { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgba(4,16,22,.5); z-index: 55; display: none; } .shell.open .scrim { display: block; }
}
@media (max-width: 600px) {
  .g4 { grid-template-columns: 1fr; } .page-head h1 { font-size: 23px; } .crumb small { display: none; } .live-dot span { display: none; } .live-dot { padding: 0; width: 40px; justify-content: center; }
  .toasts { right: 16px; left: 16px; width: auto; } .login-card { padding: 30px 22px 24px; }
}
@media (min-width: 1001px) { .scrim { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .side, .top, .toasts, .savebar { display: none !important; } .shell { display: block; } }

/* логи: раскрытие контекста */
.tbl td.ctx { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font: 500 11.5px var(--mono); cursor: pointer; }
.tbl td.ctx.open { white-space: pre-wrap; word-break: break-all; color: var(--muted); }

/* доводка */
.tbl .row-actions { flex-wrap: nowrap; }
.chart { height: 330px; }
.editor .f-grid.s { grid-template-columns: repeat(2, minmax(0,1fr)); }
.editor .f-grid.s > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ═════ v2.1 · Досье, наказания, моя статистика ═════ */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); font-size: 13.5px; line-height: 1.5; }
.notice > svg { flex: none; margin-top: 2px; }
.notice.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); } .notice.bad a, .notice.bad b { color: inherit; }
.notice.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); } .notice.warn a, .notice.warn b { color: inherit; }
.notice.info { background: var(--info-bg); border-color: transparent; color: var(--info); }
.notice a { text-decoration: underline; }
.dos-search { display: flex; gap: 10px; align-items: center; }
.dos-search .grow { flex: 1; } .dos-search input { height: 44px; font-size: 15px; font-weight: 600; }
.dos-hero { display: flex; gap: 26px; align-items: center; padding: 24px 28px; position: relative; overflow: hidden; background: linear-gradient(120deg, var(--card) 40%, var(--brand-soft)); }
.dos-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, var(--brand-glow), transparent 70%); pointer-events: none; }
.dos-av { width: 96px; height: auto; max-height: 150px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 10px 16px rgba(0,0,0,.25)); flex: none; }
.dos-main { min-width: 0; position: relative; z-index: 1; }
.dos-name { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .dos-name h2 { margin: 0; font: 800 28px var(--font-h); letter-spacing: -.02em; }
.dos-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 8px; align-items: center; } .dos-meta b { color: var(--text); }
.dos-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.tile span { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile b { display: block; font: 800 26px var(--font-h); margin-top: 4px; } .tile small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.t-bad { color: var(--bad); } .t-warn { color: var(--warn); }
.dos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dos-side { position: sticky; top: 84px; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; background: transparent; border-radius: 10px; font: 700 13px var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; transition: .15s; }
.tabs button:hover { color: var(--text); } .tabs button.on { background: var(--brand-soft); color: var(--brand-3); box-shadow: inset 0 0 0 1px var(--brand); }
.tabs em { font-style: normal; font-size: 11px; background: var(--card-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.pane { display: none; } .pane.on { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sec-t { margin: 20px 0 10px; font: 800 13px var(--font-h); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; } .chip.xs { height: 26px; padding: 0 10px; font-size: 11.5px; cursor: pointer; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; } .act-grid .btn { justify-content: center; }
.btn.warn-btn { color: var(--warn); background: var(--warn-bg); border-color: transparent; box-shadow: none; } .btn.warn-btn:hover { background: var(--warn); color: #fff; }
.note-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.notes { display: grid; gap: 10px; }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 12px 16px; }
.note.tag-warn { border-left-color: #f59e0b; } .note.tag-suspect { border-left-color: var(--bad); } .note.tag-vip { border-left-color: #818cf8; } .note.tag-ok { border-left-color: var(--ok); }
.note.pinned { box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm); }
.note-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .note-who { color: var(--muted); font-size: 12px; font-weight: 600; }
.note-ctl { margin-left: auto; display: flex; gap: 6px; } .icon-btn.mini { width: 28px; height: 28px; border-radius: 8px; } .icon-btn.bad:hover { color: var(--bad); border-color: var(--bad); }
.note-t { margin-top: 8px; font-size: 13.5px; line-height: 1.55; white-space: normal; word-break: break-word; }
.lrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; } .lrow span { color: var(--muted); } .lrow b { text-align: right; }
.lblock { padding-top: 10px; font-size: 12.5px; word-break: break-word; } .lblock small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: .05em; margin-bottom: 4px; }
.skel { height: 14px; border-radius: 7px; margin: 10px 0; background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; animation: skel 1.2s linear infinite; } .skel.w60 { width: 60%; }
@keyframes skel { to { background-position: -200% 0; } }
.dot-l { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: baseline; }
.rank-big { display: flex; align-items: baseline; gap: 10px; } .rank-big span { font: 800 44px var(--font-h); background: linear-gradient(135deg, #5fe0f7, #6d7cff); -webkit-background-clip: text; background-clip: text; color: transparent; } .rank-big small { color: var(--muted); font-weight: 700; }
.mini-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); } .mini-row .t { font-weight: 700; font-size: 13px; } .mini-row .s { color: var(--muted); font-size: 11.5px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.test-row { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; } .test-res { font-size: 13px; font-weight: 700; color: var(--muted); } .test-res.ok { color: var(--ok); } .test-res.bad { color: var(--bad); }
.pw .gen { border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--muted); padding: 0 10px; } .pw .gen:hover { color: var(--brand-2); }
pre.code { margin: 14px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: #0b1c24; color: #b8e8f2; font: 12px/1.6 var(--mono); overflow-x: auto; white-space: pre; }
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(4, minmax(0,1fr)); } .dos-layout { grid-template-columns: 1fr; } .dos-side { position: static; } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } .dos-hero { flex-direction: column; text-align: center; padding: 20px; } .dos-name, .dos-meta, .dos-act { justify-content: center; } .dos-search { flex-direction: column; align-items: stretch; } }
.dos-layout > *, .set-layout > *, .grid > * { min-width: 0; }
@media (max-width: 1180px) { .dos-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .set-layout { grid-template-columns: minmax(0, 1fr); } .set-nav { overflow-x: auto; } .tbl-wrap { overflow-x: auto; } .topbar, .top { gap: 6px; } .cmd-btn { min-width: 0; flex: 1; overflow: hidden; } .cmd-btn kbd { display: none; } }

/* ===== Роль «Хелпер» ===== */
.role.helper { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .role.helper { background: rgba(34,197,94,.16); color: #4ade80; }

/* ===== Удаление (superadmin) ===== */
.inl-form { display: inline-block; margin: 0; }
.danger-zone { margin-top: 22px; border: 1px dashed var(--bad); border-radius: 14px; background: var(--bad-bg); }
.danger-zone > summary { cursor: pointer; list-style: none; padding: 13px 16px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13.5px; color: var(--bad); }
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone > summary .role { margin-left: auto; }
.dz-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 4px 16px 16px; }
.dz-form .fld { min-width: 220px; flex: 1 1 220px; }

/* ===== Мануалы и правила команды ===== */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.doc-tile { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: .18s; }
.doc-tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.doc-tile b { font: 800 15.5px var(--font-h); }
.doc-tile p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; }
.doc-tile-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); }
.doc-tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.doc-card { max-width: 860px; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.doc-head h2 { margin: 0 0 10px; font: 800 24px var(--font-h); }
.doc-meta-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.doc-tools { display: flex; gap: 8px; margin-top: 14px; }
.doc-body { font-size: 14.5px; line-height: 1.7; }
.doc-body h2, .doc-body h3, .doc-body h4 { font-family: var(--font-h); margin: 26px 0 10px; }
.doc-body h2 { font-size: 20px; } .doc-body h3 { font-size: 17px; } .doc-body h4 { font-size: 15px; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 22px; }
.doc-body li { margin-bottom: 5px; }
.doc-body blockquote { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 12px 12px 0; }
.doc-body code { background: var(--card-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.doc-body a { color: var(--brand-2); font-weight: 700; text-decoration: underline; }
.doc-editor { width: 100%; font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; min-height: 320px; }
@media (max-width: 800px) { .doc-meta { grid-template-columns: 1fr !important; } }

/* ===== Управление ролями и правами ===== */
.roles-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .roles-layout { grid-template-columns: 1fr; } }
.role-list { display: flex; flex-direction: column; gap: 10px; }
.role-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: inherit; transition: all .18s ease; position: relative; }
.role-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.role-card.on { border-color: var(--rc, var(--brand)); background: color-mix(in srgb, var(--rc, var(--brand)) 10%, var(--card)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc, var(--brand)) 30%, transparent); }
.role-card.static { opacity: .75; cursor: default; }
.role-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rc, #54daf4); flex-shrink: 0; box-shadow: 0 0 8px var(--rc); }
.role-card .rc-main { flex: 1; min-width: 0; }
.role-card .rc-main b { display: block; font: 800 14px var(--font-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.role-card .rc-main small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.role-card .rc-cnt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }

.role-editor { padding: 24px; }
.role-top { display: grid; grid-template-columns: 1fr 90px 130px 160px; gap: 14px; margin-bottom: 14px; }
@media (max-width: 760px) { .role-top { grid-template-columns: 1fr 1fr; } }
.role-color input[type="color"] { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; padding: 2px; }
.perm-group { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--card-2); }
.perm-group header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.perm-group header h4 { margin: 0; font: 800 14.5px var(--font-h); color: var(--text); }
.perm-group header span { font-size: 12px; color: var(--muted); }
.perm-group header .link-btn { background: none; border: 0; color: var(--brand-2); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.perm { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; user-select: none; transition: .15s; }
.perm:hover { border-color: var(--line-2); }
.perm input { position: absolute; opacity: 0; width: 0; height: 0; }
.pm-box { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--line-2); background: transparent; display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; transition: .15s; }
.perm input:checked ~ .pm-box { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 10px var(--brand-soft); }
.perm input:checked ~ .pm-box::after { content: ""; width: 5px; height: 9px; border: solid #09272e; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-0.5px, -1px); }
.perm .pm-t { flex: 1; min-width: 0; }
.perm .pm-t b { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); }
.perm .pm-t small { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.perm.danger { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.perm.danger:hover { border-color: var(--bad); }
.perm.danger input:checked ~ .pm-box { background: var(--bad); border-color: var(--bad); }
.perm.danger input:checked ~ .pm-box::after { border-color: #fff; }

.role-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.role-actions .end { margin-left: auto; }

.staff-role-form { display: inline-flex; align-items: center; margin: 0; }
.role-select { appearance: none; -webkit-appearance: none; font: 800 11.5px var(--font); border-radius: 8px; padding: 5px 24px 5px 10px; border: 1px solid color-mix(in srgb, var(--rc, var(--brand)) 40%, var(--line)); background: color-mix(in srgb, var(--rc, var(--brand)) 12%, var(--card)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center; color: var(--rc, var(--text)); cursor: pointer; transition: .15s; }
.role-select:hover { border-color: var(--rc, var(--brand)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc, var(--brand)) 25%, transparent); }
.role-select option { background: var(--card); color: var(--text); font-weight: 600; }
.role-pick label div .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rc, #54daf4); margin-right: 6px; box-shadow: 0 0 6px var(--rc); }
