/* admin-mono.css — тема «Mono»: строго чёрно-серо-белая палитра, без цветных акцентов.
 * Подключается ПОСЛЕ panel.css; всё действует только при <html data-theme="mono">.
 * Цвет передаётся яркостью, обводкой и начертанием, а не оттенком.
 * Остаточный цвет из inline-стилей (иконки, бейджи, прогресс-бары) гасится grayscale-фильтром
 * на листовых элементах; предпросмотр приложения (.pv-screen) намеренно не затрагивается. */

[data-theme="mono"] {
  --bg-root:    #040404;
  --bg-surface: #070707;
  --bg-card:    #0b0b0b;
  --bg-hover:   #151515;
  --bg-input:   #080808;
  --border:        rgba(255,255,255,.085);
  --border-accent: rgba(255,255,255,.26);
  --text-primary:   #f4f4f4;
  --text-secondary: #a3a3a3;
  --text-muted:     #626262;
  --accent:      #f4f4f4;
  --accent-glow: rgba(255,255,255,.10);
  --accent-rgb:  244,244,244;
  --accent-2:    #bdbdbd;
  --accent-3:    #8c8c8c;
  --primary:     #f4f4f4;
  --green:   #ededed;
  --red:     #bdbdbd;
  --yellow:  #9b9b9b;
  --danger:  #d6d6d6;
  --warning: #a8a8a8;
  --sidebar-w: 3.5rem;
  --topbar-h:  5.25rem;
  --radius:    1.125rem;
  --radius-sm: .625rem;
  --shadow:    0 .5rem 2rem rgba(0,0,0,.7);
  --font-body: 'Sora', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --bg: var(--bg-root); --bg-2: var(--bg-surface);
  --card: var(--bg-card); --card-bg: var(--bg-card);
  --hover: var(--bg-hover); --text: var(--text-primary); --font: var(--font-body);
  color-scheme: dark;
}

[data-theme="mono"] body { background:#000; color:var(--text-primary); }
[data-theme="mono"] ::selection { background:#f4f4f4; color:#000; }
[data-theme="mono"] * { scrollbar-color:#2a2a2a transparent; }
[data-theme="mono"] ::-webkit-scrollbar { width:.5rem; height:.5rem; }
[data-theme="mono"] ::-webkit-scrollbar-thumb { background:#242424; border-radius:1rem; }
[data-theme="mono"] ::-webkit-scrollbar-thumb:hover { background:#3a3a3a; }

/* фон: чистый чёрный, без сетки и орбит */
[data-theme="mono"] .main-content::before { display:none; }
[data-theme="mono"] #auth-screen { background:#000; }
[data-theme="mono"] #auth-screen::before,
[data-theme="mono"] #auth-screen::after { display:none; }
[data-theme="mono"] .auth-card { background:#0a0a0a; border-color:var(--border); box-shadow:0 2rem 6rem rgba(0,0,0,.8); }
[data-theme="mono"] .auth-logo .brand,
[data-theme="mono"] .sidebar-brand { background:none; -webkit-text-fill-color:currentColor; color:#fff; }
[data-theme="mono"] .auth-logo .sub { letter-spacing:.3em; }

/* ───────── SIDEBAR: иконочная рейка, по наведению раскрывается ───────── */
[data-theme="mono"] #sidebar { background:#050505; border-right:1px solid var(--border); filter:grayscale(1); }
[data-theme="mono"] .sidebar-header { padding:1rem .625rem; border-bottom:none; display:flex; justify-content:center; background:none; }
[data-theme="mono"] .sidebar-header::after { display:none; }
[data-theme="mono"] .sidebar-logo-wrap { filter:grayscale(1); }
[data-theme="mono"] .sidebar-brand-row { gap:.75rem; }
[data-theme="mono"] .sidebar-app-badge { display:none; }
[data-theme="mono"] .sidebar-tagline { color:var(--text-muted); letter-spacing:.2em; }
[data-theme="mono"] .nav-section-label { font-family:var(--font-mono); font-size:.5625rem; letter-spacing:.22em; color:var(--text-muted); }
[data-theme="mono"] .nav-item { border:1px solid transparent; border-radius:.75rem; color:var(--text-secondary); font-size:.8125rem; }
[data-theme="mono"] .nav-item:hover { background:#121212; color:#fff; }
[data-theme="mono"] .nav-item:hover::before { display:none; }
[data-theme="mono"] .nav-item.active { background:#ececec; color:#000; border-color:#ececec; font-weight:600; }
[data-theme="mono"] .nav-badge,
[data-theme="mono"] .nav-badge.green,
[data-theme="mono"] .nav-badge.red,
[data-theme="mono"] .nav-badge.yellow { background:#f4f4f4; color:#000; font-weight:700; }
[data-theme="mono"] .nav-item.active .nav-badge { background:#000; color:#fff; }
[data-theme="mono"] .sidebar-footer { border-top:1px solid var(--border); }

@media (min-width:56.26em) {
  [data-theme="mono"] #sidebar { width:3.5rem; transition:width .22s cubic-bezier(.25,.8,.25,1), box-shadow .22s; }
  [data-theme="mono"] #sidebar:hover,
  [data-theme="mono"] #sidebar:focus-within { width:16.25rem; box-shadow:1.5rem 0 4rem rgba(0,0,0,.85); }
  [data-theme="mono"] #sidebar .sidebar-brand-text,
  [data-theme="mono"] #sidebar .nav-section-label,
  [data-theme="mono"] #sidebar:not(:hover):not(:focus-within) .nav-badge { display:none !important; }
  [data-theme="mono"] #sidebar:hover .sidebar-brand-text,
  [data-theme="mono"] #sidebar:focus-within .sidebar-brand-text { display:block; }
  [data-theme="mono"] #sidebar:hover .nav-section-label,
  [data-theme="mono"] #sidebar:focus-within .nav-section-label { display:block; }
  [data-theme="mono"] #sidebar:hover .nav-badge,
  [data-theme="mono"] #sidebar:focus-within .nav-badge { display:inline-block; }
  [data-theme="mono"] #sidebar .sidebar-nav { padding:.5rem .4375rem; }
  /* подписи пунктов — текстовые узлы: гасим размером шрифта, иконку возвращаем */
  [data-theme="mono"] #sidebar .nav-item { font-size:0; gap:0; padding:.6875rem; justify-content:center; white-space:nowrap; overflow:hidden; }
  [data-theme="mono"] #sidebar .nav-item .icon { font-size:1rem; width:1.5rem; }
  [data-theme="mono"] #sidebar:hover .nav-item,
  [data-theme="mono"] #sidebar:focus-within .nav-item { font-size:.8125rem; gap:.6875rem; justify-content:flex-start; padding:.625rem .75rem; }
  [data-theme="mono"] #sidebar:hover .nav-item .icon,
  [data-theme="mono"] #sidebar:focus-within .nav-item .icon { width:1.25rem; }
  [data-theme="mono"] #sidebar .sidebar-footer { padding:.5rem .4375rem; }
}

/* ───────── TOPBAR / ЗАГОЛОВОК СТРАНИЦЫ ───────── */
[data-theme="mono"] .topbar { background:rgba(4,4,4,.92); backdrop-filter:blur(10px); border-bottom:1px solid var(--border); padding:0 2rem; }
[data-theme="mono"] .topbar-title-wrap { display:flex; flex-direction:column-reverse; gap:.375rem; }
[data-theme="mono"] .page-title { font-size:clamp(1.5rem,3vw,2.25rem); font-weight:800; letter-spacing:-.03em; text-transform:uppercase; line-height:1; color:#fff; }
[data-theme="mono"] .page-breadcrumb { font-size:.5625rem; letter-spacing:.28em; text-transform:uppercase; color:var(--text-muted); }
[data-theme="mono"] .server-status { color:#f4f4f4; background:transparent; border:1px solid var(--border-accent); border-radius:.375rem; font-size:.625rem; letter-spacing:.16em; text-transform:uppercase; }
[data-theme="mono"] .server-status .dot { background:#fff; box-shadow:0 0 .5rem rgba(255,255,255,.6); }
[data-theme="mono"] .lang-btn { font-family:var(--font-mono); letter-spacing:.1em; }
[data-theme="mono"] .lang-btn.active { background:#ececec; color:#000; }
[data-theme="mono"] .admin-avatar-ring { background:#2a2a2a !important; }
[data-theme="mono"] .admin-avatar-inner { background:#111 !important; color:#fff; }
[data-theme="mono"] .admin-dropdown { background:#0a0a0a; border:1px solid var(--border-accent); }
[data-theme="mono"] .theme-dot.active,
[data-theme="mono"] .theme-opt.active { border-color:#fff; }

/* ───────── КАРТОЧКИ ───────── */
[data-theme="mono"] .card,
[data-theme="mono"] .stat-card {
  background:linear-gradient(180deg,#0e0e0e 0%,#090909 100%);
  border:1px solid var(--border); border-radius:1.25rem; box-shadow:none;
}
[data-theme="mono"] .card:hover { border-color:rgba(255,255,255,.16); }
[data-theme="mono"] .stat-card { padding:1.375rem 1.5rem; filter:grayscale(1); }
[data-theme="mono"] .stat-card:hover { transform:none; border-color:rgba(255,255,255,.2); }
[data-theme="mono"] .card-title,
[data-theme="mono"] .stat-label {
  font-family:var(--font-mono); font-size:.625rem; font-weight:500; letter-spacing:.2em;
  text-transform:uppercase; color:var(--text-muted);
}
[data-theme="mono"] .stat-value { font-family:var(--font-body); font-weight:600; font-size:clamp(1.9rem,3.4vw,2.75rem); letter-spacing:-.03em; color:#fff; }
[data-theme="mono"] .stat-sub,
[data-theme="mono"] .section-sub { font-family:var(--font-mono); font-size:.6875rem; color:var(--text-muted); }
[data-theme="mono"] .stat-change.up,
[data-theme="mono"] .stat-change.down { color:var(--text-secondary); }
[data-theme="mono"] .stat-change.up::before { content:'↑ '; }
[data-theme="mono"] .stat-change.down::before { content:'↓ '; }
[data-theme="mono"] .stat-icon,
[data-theme="mono"] .stat-icon-wrap,
[data-theme="mono"] .stat-icon-wrap.green,
[data-theme="mono"] .stat-icon-wrap.red,
[data-theme="mono"] .stat-icon-wrap.yellow,
[data-theme="mono"] .stat-icon-wrap.blue,
[data-theme="mono"] .stat-icon-wrap.purple { background:#141414 !important; color:#d8d8d8 !important; border:1px solid var(--border); }
[data-theme="mono"] .section-title { font-weight:800; letter-spacing:-.01em; text-transform:uppercase; }

/* ───────── КНОПКИ ───────── */
[data-theme="mono"] .btn { border-radius:.625rem; font-family:var(--font-mono); font-size:.6875rem; font-weight:500; letter-spacing:.12em; text-transform:uppercase; }
[data-theme="mono"] .btn-primary { background:#f4f4f4; color:#000; box-shadow:none; border:1px solid #f4f4f4; }
[data-theme="mono"] .btn-primary:hover { background:#fff; filter:none; transform:none; }
[data-theme="mono"] .btn-secondary { background:transparent; color:#f4f4f4; border:1px solid var(--border-accent); }
[data-theme="mono"] .btn-secondary:hover { background:#141414; border-color:#fff; }
[data-theme="mono"] .btn-ghost { color:var(--text-secondary); }
[data-theme="mono"] .btn-ghost:hover { color:#fff; background:#121212; border-color:var(--border); }
[data-theme="mono"] .btn-danger { background:transparent; color:#e6e6e6; border:1px dashed rgba(255,255,255,.4); }
[data-theme="mono"] .btn-danger:hover { background:#fff; color:#000; border-style:solid; }
[data-theme="mono"] .btn-success { background:#1a1a1a; color:#f4f4f4; border:1px solid rgba(255,255,255,.22); }
[data-theme="mono"] .btn-success:hover { background:#262626; }
[data-theme="mono"] .btn-sm { font-size:.625rem; }

/* ───────── ФОРМЫ ───────── */
[data-theme="mono"] .field label { font-family:var(--font-mono); font-size:.625rem; letter-spacing:.18em; color:var(--text-muted); }
[data-theme="mono"] .field input,
[data-theme="mono"] .field textarea,
[data-theme="mono"] .field select,
[data-theme="mono"] .search-input,
[data-theme="mono"] .filter-select { background:#070707; border:1px solid var(--border); border-radius:.625rem; color:#f4f4f4; }
[data-theme="mono"] .field input:focus,
[data-theme="mono"] .field textarea:focus,
[data-theme="mono"] .field select:focus,
[data-theme="mono"] .search-input:focus { border-color:#fff; box-shadow:0 0 0 .1875rem rgba(255,255,255,.08); }
[data-theme="mono"] input[type="checkbox"],
[data-theme="mono"] input[type="radio"],
[data-theme="mono"] input[type="range"] { accent-color:#f4f4f4; }

/* ───────── ТАБЛИЦЫ ───────── */
[data-theme="mono"] thead th { background:#070707; font-family:var(--font-mono); font-weight:500; letter-spacing:.18em; color:var(--text-muted); }
[data-theme="mono"] tbody tr:hover { background:#111; }

/* ───────── БЕЙДЖИ: оттенок заменён яркостью/обводкой ───────── */
[data-theme="mono"] .badge { font-family:var(--font-mono); letter-spacing:.08em; filter:grayscale(1); }
[data-theme="mono"] .badge-green  { background:#ececec; color:#000; border:1px solid #ececec; }
[data-theme="mono"] .badge-red    { background:transparent; color:#e6e6e6; border:1px dashed rgba(255,255,255,.45); }
[data-theme="mono"] .badge-purple { background:#262626; color:#fff; border:1px solid rgba(255,255,255,.25); }
[data-theme="mono"] .badge-yellow { background:#161616; color:#bdbdbd; border:1px solid rgba(255,255,255,.18); }
[data-theme="mono"] .badge-cyan   { background:#1d1d1d; color:#d4d4d4; border:1px solid rgba(255,255,255,.2); }
[data-theme="mono"] .badge-orange { background:#141414; color:#a8a8a8; border:1px solid rgba(255,255,255,.14); }
[data-theme="mono"] .badge-blue   { background:#1a1a1a; color:#cfcfcf; border:1px solid rgba(255,255,255,.2); }
[data-theme="mono"] .badge-gray   { background:transparent; color:var(--text-secondary); border:1px solid var(--border); }

/* ───────── ТОСТЫ / МОДАЛКИ ───────── */
[data-theme="mono"] .toast { background:#0c0c0c; border-color:var(--border-accent); border-radius:.75rem; filter:grayscale(1); }
[data-theme="mono"] .toast-success { border-left:.1875rem solid #fff; }
[data-theme="mono"] .toast-error   { border-left:.1875rem dashed #bdbdbd; }
[data-theme="mono"] .toast-info    { border-left:.1875rem solid #6b6b6b; }
[data-theme="mono"] .modal-overlay { background:rgba(0,0,0,.82); }
[data-theme="mono"] .modal { background:#0a0a0a; border:1px solid var(--border-accent); border-radius:1.25rem; box-shadow:0 2rem 6rem rgba(0,0,0,.9); }
[data-theme="mono"] .modal-title { text-transform:uppercase; letter-spacing:-.01em; font-weight:800; }

/* ───────── ГРАФИКИ / ЛЕНТЫ ───────── */
[data-theme="mono"] .chart-wrap { filter:grayscale(1); }
[data-theme="mono"] .activity-feed { filter:grayscale(1); }

/* ───────── остаточный цвет из inline-стилей ───────── */
[data-theme="mono"] :is(i,span,b,strong,a,svg,small,label,button,td,th,div:empty)[style*="#"]:not(.pv-screen *):not(.theme-dot):not(.theme-opt-swatch),
[data-theme="mono"] :is(i,span,b,strong,a,svg,small,label,button,td,th,div:empty)[style*="rgb"]:not(.pv-screen *):not(.theme-dot):not(.theme-opt-swatch),
[data-theme="mono"] :is(i,span,b,strong,a,svg,small,label,button,td,th,div:empty)[style*="hsl"]:not(.pv-screen *):not(.theme-dot):not(.theme-opt-swatch) { filter:grayscale(1); }
[data-theme="mono"] .main-content a:not(.btn):not(.nav-item) { color:#f4f4f4; text-decoration-color:rgba(255,255,255,.3); }

@media (max-width:56.25em) {
  [data-theme="mono"] { --sidebar-w:16rem; --topbar-h:4.25rem; }
  [data-theme="mono"] .topbar { padding:0 1rem; }
  [data-theme="mono"] .page-title { font-size:1.25rem; }
}
