/* ============================================================================
   auth-admin.css — единый визуальный язык Login + Admin (2026-11-17, z118)
   Терминальный dark UI: глубокий фон, стекло, синий focus, золотой accent.
   Подключается ПОСЛЕ style.css только на login.html / admin.html.
   ============================================================================ */

body.auth-body,
body.admin-body {
  --aa-bg: #05070b;
  --aa-panel: #0b0f16;
  --aa-panel2: #10151f;
  --aa-line: rgba(255, 255, 255, .085);
  --aa-line-strong: rgba(255, 255, 255, .14);
  --aa-text: #e9edf5;
  --aa-dim: #8d95a5;
  --aa-blue: #4d8dff;
  --aa-blue2: #2f6ef0;
  --aa-gold: #f5b83d;
  --aa-green: #14b77d;
  --aa-red: #f0455a;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--aa-text);
  background-color: var(--aa-bg);
  background-image:
    radial-gradient(1100px 620px at 6% -12%, rgba(77, 141, 255, .20), transparent 62%),
    radial-gradient(900px 560px at 100% 2%, rgba(245, 184, 61, .085), transparent 58%),
    radial-gradient(900px 700px at 55% 118%, rgba(20, 183, 125, .07), transparent 60%);
  background-attachment: fixed;
}

body.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px;
  overflow-x: hidden;
  overflow-y: auto;
}

body.auth-body::before,
body.admin-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .30;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
}

/* ───────────────────────────── AUTH SHELL ───────────────────────────── */

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .82fr);
  border: 1px solid var(--aa-line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(8, 11, 17, .88);
  box-shadow:
    0 50px 140px rgba(0, 0, 0, .72),
    0 0 0 1px rgba(255, 255, 255, .025) inset,
    0 1px 0 rgba(255, 255, 255, .06) inset;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: aa-rise .55s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes aa-rise {
  from { opacity: 0; transform: translateY(14px) scale(.992); }
  to { opacity: 1; transform: none; }
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 46px 46px 38px;
  border-right: 1px solid var(--aa-line);
  background:
    radial-gradient(520px 340px at 0% 0%, rgba(77, 141, 255, .18), transparent 65%),
    radial-gradient(420px 320px at 95% 100%, rgba(20, 183, 125, .10), transparent 62%),
    linear-gradient(155deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008) 55%, rgba(0, 0, 0, .12));
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .35;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
}

.auth-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 141, 255, .30), transparent 68%);
  filter: blur(2px);
  pointer-events: none;
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-logo {
  display: flex;
  align-items: flex-end;
  height: 46px;
}

.auth-logo-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
}

.auth-logo-bars i {
  display: block;
  width: 11px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

.auth-logo-bars i:nth-child(1) { height: 20px; background: linear-gradient(180deg, #ff6b7a, var(--aa-red)); }
.auth-logo-bars i:nth-child(2) { height: 32px; background: linear-gradient(180deg, #ffd87a, var(--aa-gold)); }
.auth-logo-bars i:nth-child(3) { height: 46px; background: linear-gradient(180deg, #45ddb0, var(--aa-green)); }

.auth-brand {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -1.4px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 10%, #cfe0ff 52%, #8fb5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-tagline {
  margin: 0;
  max-width: 44ch;
  color: var(--aa-dim);
  font-size: 14px;
  line-height: 1.62;
}

.auth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--aa-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #b7c2d6;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aa-green);
  box-shadow: 0 0 0 4px rgba(20, 183, 125, .12);
}

.auth-chip.gold { color: #f3d38b; }
.auth-chip.gold i { background: var(--aa-gold); box-shadow: 0 0 0 4px rgba(245, 184, 61, .12); }
.auth-chip.blue { color: #a9c4ff; }
.auth-chip.blue i { background: var(--aa-blue); box-shadow: 0 0 0 4px rgba(77, 141, 255, .14); }

.auth-feats {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.auth-feats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--aa-line);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  color: var(--aa-dim);
  font-size: 11.5px;
  line-height: 1.45;
  transition: border-color .18s, transform .18s, background .18s;
}

.auth-feats li:hover {
  border-color: rgba(77, 141, 255, .35);
  background: linear-gradient(180deg, rgba(77, 141, 255, .07), rgba(255, 255, 255, .015));
  transform: translateY(-1px);
}

.auth-feats li > b.ic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--aa-line);
  background: #0f141d;
  color: #c8d6ee;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .4px;
}

.auth-feats span b { display: block; margin-bottom: 2px; color: var(--aa-text); font-size: 12px; }

.auth-hero-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 18px;
  border-top: 1px solid var(--aa-line);
  color: #6f7888;
  font-size: 10.5px;
  letter-spacing: .3px;
}

.auth-hero-foot b { color: #aab7cc; font-weight: 700; }

/* ───────────────────────────── AUTH FORM ───────────────────────────── */

.auth-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 40px;
  background:
    radial-gradient(420px 280px at 100% 0%, rgba(77, 141, 255, .09), transparent 65%),
    linear-gradient(180deg, #0c111a, #090d14);
}

.auth-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-box h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.5px;
  font-weight: 800;
  color: #f2f5fb;
}

.auth-sub {
  margin: 7px 0 0;
  color: var(--aa-dim);
  font-size: 12px;
  line-height: 1.5;
}

.auth-theme {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--aa-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #aeb9cb;
  font-size: 11px;
  white-space: nowrap;
}

.auth-theme:hover { border-color: var(--aa-line-strong); color: var(--aa-text); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 4px;
  border: 1px solid var(--aa-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .26);
}

.auth-tabs button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8e99ab;
  font-size: 12.5px;
  font-weight: 700;
  transition: background .18s, color .18s, box-shadow .18s;
}

.auth-tabs button:hover { color: #dbe5f4; }

.auth-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #5b98ff, var(--aa-blue2));
  box-shadow: 0 6px 18px rgba(47, 110, 240, .35), 0 1px 0 rgba(255, 255, 255, .18) inset;
}

#errorMsg, #infoMsg {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.45;
}

#errorMsg.on, #infoMsg.on { display: block; }
#errorMsg { border: 1px solid rgba(240, 69, 90, .35); background: rgba(240, 69, 90, .09); color: #ff9aa7; }
#infoMsg { border: 1px solid rgba(20, 183, 125, .30); background: rgba(20, 183, 125, .08); color: #8be3c5; }

.auth-box .form-group { margin-bottom: 14px; }

.auth-box .form-group label {
  display: block;
  margin: 0 0 6px;
  color: #8893a6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.auth-box .form-group input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--aa-line);
  border-radius: 10px;
  background: #0a0f17;
  color: #edf2fb;
  font-size: 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-box .form-group input::placeholder { color: #5d6779; }

.auth-box .form-group input:focus {
  border-color: rgba(77, 141, 255, .72);
  background: #0b111b;
  box-shadow: 0 0 0 3px rgba(77, 141, 255, .14);
}

.auth-box .form-group input.invalid {
  border-color: rgba(240, 69, 90, .7);
  box-shadow: 0 0 0 3px rgba(240, 69, 90, .10);
}

.auth-box .hint { color: #7c8799; font-size: 11.5px; line-height: 1.45; }
.auth-box .hint a { color: #9dbfff; text-decoration: none; }
.auth-box .hint a:hover { text-decoration: underline; }

.btn-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  background: linear-gradient(180deg, #5b98ff 0%, #3d7cf2 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 10px 28px rgba(47, 110, 240, .38), 0 1px 0 rgba(255, 255, 255, .18) inset;
  transition: filter .18s, transform .12s, box-shadow .18s;
}

.btn-submit:hover { filter: brightness(1.06); box-shadow: 0 14px 32px rgba(47, 110, 240, .45); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { opacity: .55; cursor: default; filter: none; }

.auth-form-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: #687385;
  font-size: 10.5px;
  line-height: 1.4;
}

.auth-form-note b { color: #a9b6c9; font-weight: 700; }

.about-box {
  margin-top: 18px;
  border: 1px solid var(--aa-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
}

.about-box summary {
  padding: 10px 12px;
  color: #9aa6b9;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.about-box summary::-webkit-details-marker { display: none; }
.about-box summary::before { content: "＋"; margin-right: 7px; color: var(--aa-blue); }
.about-box[open] summary::before { content: "－"; }
.about-box summary:hover { color: var(--aa-text); }

.about-box .about-body {
  padding: 0 12px 12px;
  color: #8894a7;
  font-size: 11.5px;
  line-height: 1.55;
}

.about-box .about-body p { margin: 6px 0; }
.about-box .about-body ul { margin: 4px 0; padding-left: 18px; }
.about-box .about-body li { margin: 3px 0; }
.about-box .about-body b { color: #c6d1e2; }

/* ───────────────────────────── ADMIN ───────────────────────────── */

body.admin-body {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--aa-line);
  background: rgba(6, 9, 14, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-brand .brand-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-right: 2px;
}

.admin-brand .brand-bars i { display: block; width: 6px; border-radius: 2px; }
.admin-brand .brand-bars i:nth-child(1) { height: 12px; background: var(--aa-red); }
.admin-brand .brand-bars i:nth-child(2) { height: 19px; background: var(--aa-gold); }
.admin-brand .brand-bars i:nth-child(3) { height: 26px; background: var(--aa-green); }

.admin-brand strong {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.45px;
  background: linear-gradient(120deg, #fff, #bcd3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(245, 184, 61, .35);
  border-radius: 6px;
  background: rgba(245, 184, 61, .10);
  color: #f3cd7a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.admin-sub {
  padding-left: 10px;
  border-left: 1px solid var(--aa-line);
  color: #667185;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-header-actions .btn,
.admin-toolbar .btn,
.admin-create .btn {
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--aa-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #c6d1e2;
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color .16s, background .16s, color .16s;
}

.admin-header-actions .btn:hover,
.admin-toolbar .btn:hover,
.admin-create .btn:hover {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .065);
  color: #fff;
}

.admin-header-actions .btn.main,
.admin-toolbar .btn.main,
.admin-create .btn.main {
  border-color: rgba(77, 141, 255, .75);
  background: linear-gradient(180deg, #5b98ff, var(--aa-blue2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 110, 240, .28);
}

.admin-main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 16px 16px 14px;
  border: 1px solid var(--aa-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012)),
    #0b0f16;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .20);
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--aa-blue), transparent);
  opacity: .8;
}

.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--aa-gold), transparent); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--aa-green), transparent); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--aa-red), transparent); }
.stat-card:nth-child(5)::before { background: linear-gradient(90deg, #a879ff, transparent); }

.stat-label {
  color: #7e899b;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.stat-value {
  margin: 8px 0 4px;
  color: #f2f6ff;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
}

.stat-sub { color: #687385; font-size: 10.5px; }
.stat-sub span { color: #b7c4d8; font-weight: 700; }

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--aa-line);
  border-radius: 13px;
  background: rgba(0, 0, 0, .24);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tabs button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8d98aa;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .16s, color .16s;
}

.admin-tabs button:hover { color: #dbe5f4; }

.admin-tabs button.active {
  background: linear-gradient(180deg, #5b98ff, var(--aa-blue2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 110, 240, .28);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--aa-line);
  border-radius: 16px;
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(77, 141, 255, .045), transparent 65%),
    rgba(10, 14, 21, .72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.admin-toolbar input[type=search],
.admin-toolbar input[type=date],
.admin-toolbar select,
.admin-create input,
.admin-create select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--aa-line);
  border-radius: 8px;
  background: #0a0f17;
  color: #dfe7f4;
  font-size: 12px;
  outline: none;
}

.admin-toolbar input:focus,
.admin-toolbar select:focus,
.admin-create input:focus,
.admin-create select:focus {
  border-color: rgba(77, 141, 255, .7);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, .12);
}

.admin-toolbar input[type=search] { flex: 1 1 240px; min-width: 200px; }
.admin-toolbar select { min-width: 150px; }
.admin-toolbar .hint { color: #7b8799; font-size: 11px; }

.admin-create {
  border: 1px solid var(--aa-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
  padding: 0 12px;
}

.admin-create summary {
  padding: 10px 0;
  color: #aab7ca;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.admin-create summary:hover { color: #fff; }
.admin-create[open] summary { border-bottom: 1px solid var(--aa-line); margin-bottom: 10px; }

.create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding-bottom: 12px;
}

.create-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #7f8a9c;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.create-form input,
.create-form select { width: 100%; }

.create-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--aa-line);
  border-radius: 12px;
  background: #080c12;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 10px;
  border-bottom: 1px solid var(--aa-line);
  background: #0c1119;
  color: #7d899c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.05px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  color: #cbd5e4;
  vertical-align: middle;
}

.admin-table tbody tr:hover { background: rgba(77, 141, 255, .045); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .empty { padding: 26px 12px; color: #758093; text-align: center; }
.admin-table code { color: #a9c9ff; }
.admin-table .btn.sm { height: 27px; padding: 0 8px; font-size: 11px; }

.admin-hint { color: #748096; font-size: 10.5px; line-height: 1.55; }
.admin-hint code { color: #a9c9ff; }

.admin-panel h3 {
  margin: 1px 0 2px;
  color: #8c98ab;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.audit-date { display: inline-flex; align-items: center; gap: 6px; color: #7d899c; font-size: 11px; }

/* Modals on admin page */
body.admin-body .modal { background: rgba(0, 0, 0, .74); backdrop-filter: blur(4px); }
body.admin-body .modal .mbox {
  border: 1px solid var(--aa-line-strong);
  border-radius: 16px;
  background: #0c1119;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7);
  padding: 20px;
  width: min(520px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}
body.admin-body .modal .mbox h3 { margin: 0 0 6px; color: #eef3fb; font-size: 17px; letter-spacing: -.3px; }
body.admin-body .modal .mbox .hint { color: #7f8b9e; font-size: 11.5px; line-height: 1.5; }
body.admin-body .modal .mbox input { height: 42px; border-radius: 9px; background: #080d14; }
body.admin-body .modal .mbox .btn { height: 34px; }
body.admin-body .modal .mbox .btn.main { background: linear-gradient(180deg, #5b98ff, var(--aa-blue2)); border-color: rgba(77, 141, 255, .8); }
body.admin-body .modal .btns { display: flex; justify-content: flex-end; gap: 8px; }

/* ───────────────────────────── RESPONSIVE ───────────────────────────── */

@media (max-width: 1040px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); min-height: 620px; }
  .auth-hero { padding: 34px 30px; }
  .auth-brand { font-size: 36px; }
  .auth-feats { grid-template-columns: 1fr; }
  .auth-box { padding: 34px 30px; }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-main { padding: 20px 18px 54px; }
  .admin-header { padding: 11px 18px; }
}

@media (max-width: 860px) {
  body.auth-body { padding: 16px; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; width: min(920px, 100%); }
  .auth-hero { grid-column: 1; grid-row: 1; }
  .auth-box { grid-column: 1 !important; grid-row: 2; }
  .about-box { grid-column: 1 / -1; grid-row: 3; }
  .auth-hero { padding: 28px 24px 22px; gap: 15px; border-right: 0; border-bottom: 1px solid var(--aa-line); }
  .auth-hero::after { width: 180px; height: 180px; right: -80px; top: -80px; }
  .auth-logo, .auth-logo-bars { height: 34px; }
  .auth-logo-bars i:nth-child(1) { height: 15px; }
  .auth-logo-bars i:nth-child(2) { height: 24px; }
  .auth-logo-bars i:nth-child(3) { height: 34px; }
  .auth-brand { font-size: 30px; }
  .auth-tagline { font-size: 12.5px; }
  .auth-feats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .auth-feats li { min-height: 0; padding: 10px; font-size: 10.5px; }
  .auth-feats li > b.ic { width: 27px; height: 27px; font-size: 8.5px; }
  .auth-hero-foot { display: none; }
  .auth-box { padding: 26px 24px 28px; }
  .auth-box h1 { font-size: 23px; }
  .admin-header { flex-wrap: wrap; align-items: flex-start; padding: 10px 14px; gap: 8px; }
  .admin-brand { flex: 0 0 auto; }
  .admin-brand strong { font-size: 16px; }
  .admin-header-actions { flex: 1 1 100%; max-width: 100%; justify-content: flex-start; }
  .admin-sub { display: none; }
  .admin-header-actions { gap: 5px; }
  .admin-header-actions .btn { height: 28px; padding: 0 8px; font-size: 10.5px; }
  .admin-main { padding: 14px 12px 46px; gap: 12px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 90px; padding: 12px; }
  .stat-value { font-size: 23px; }
  .admin-tabs { border-radius: 11px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  .admin-tabs button { width: 100%; height: 34px; padding: 0 8px; font-size: 11px; text-align: left; }
  .admin-stats .stat-card:last-child { grid-column: 1 / -1; }
  .admin-panel { padding: 12px; border-radius: 13px; }
  .admin-toolbar input[type=search],
  .admin-toolbar select { flex: 1 1 100%; width: 100%; }
}

@media (max-width: 520px) {
  .auth-feats { grid-template-columns: 1fr; }
  .auth-feats li:nth-child(n+4) { display: none; }
  .auth-box { padding: 22px 18px 24px; }
  .auth-topbar { align-items: center; }
  .auth-theme { font-size: 10px; height: 27px; padding: 0 8px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-brand .brand-bars { display: none; }
  .admin-header-actions .btn { padding: 0 7px; }
}

@media (min-width: 1600px) {
  .auth-shell { width: min(1320px, 94vw); min-height: 720px; }
  .auth-hero { padding: 56px 54px 46px; }
  .auth-brand { font-size: 50px; }
  .auth-tagline { font-size: 15.5px; }
  .auth-box { padding: 52px 50px; }
  .auth-box h1 { font-size: 30px; }
  body.auth-body > .about-box, .reg-pay-info { width: min(1320px, 94vw); }
  .admin-main { width: min(1680px, 100%); }
}

html[data-device="tv"] .auth-shell { width: min(1460px, 96vw); min-height: 780px; }
html[data-device="tv"] .auth-brand { font-size: 56px; }
html[data-device="tv"] .auth-tagline { font-size: 18px; }
html[data-device="tv"] .auth-feats li { font-size: 15px; }
html[data-device="tv"] .auth-box h1 { font-size: 34px; }
html[data-device="tv"] .auth-box .form-group input { height: 56px; font-size: 17px; }
html[data-device="tv"] .btn-submit { height: 56px; font-size: 17px; }
html[data-device="tv"] .admin-main { width: min(1760px, 100%); }
html[data-device="tv"] .stat-value { font-size: 34px; }

/* Light/silver themes: keep readable if user toggles the old theme control */
[data-theme="white"] body.auth-body,
[data-theme="white"] body.admin-body {
  --aa-bg: #eef2f8;
  --aa-panel: #ffffff;
  --aa-panel2: #f5f7fb;
  --aa-line: rgba(15, 23, 42, .10);
  --aa-line-strong: rgba(15, 23, 42, .16);
  --aa-text: #172033;
  --aa-dim: #62708a;
  background-image:
    radial-gradient(1000px 600px at 5% -10%, rgba(47, 110, 240, .12), transparent 62%),
    radial-gradient(800px 520px at 100% 0%, rgba(245, 184, 61, .08), transparent 58%);
}
[data-theme="white"] .auth-shell { background: rgba(255, 255, 255, .94); }
[data-theme="white"] .auth-hero { background: linear-gradient(155deg, rgba(47, 110, 240, .06), rgba(255, 255, 255, .2)); }
[data-theme="white"] .auth-box { background: linear-gradient(180deg, #fff, #f7f9fd); }
[data-theme="white"] .auth-brand { background: linear-gradient(120deg, #101a2e, #31578f); -webkit-background-clip: text; background-clip: text; }
[data-theme="white"] .auth-box h1 { color: #111a2b; }
[data-theme="white"] .auth-box .form-group input,
[data-theme="white"] .admin-toolbar input,
[data-theme="white"] .admin-toolbar select,
[data-theme="white"] .admin-create input,
[data-theme="white"] .admin-create select { background: #f2f5fa; color: #172033; }
[data-theme="white"] .admin-header { background: rgba(255, 255, 255, .86); }
[data-theme="white"] .admin-brand strong { background: linear-gradient(120deg, #101a2e, #31578f); -webkit-background-clip: text; background-clip: text; }
[data-theme="white"] .admin-panel { background: rgba(255, 255, 255, .78); }
[data-theme="white"] .admin-table-wrap { background: #fff; }
[data-theme="white"] .admin-table th { background: #f4f7fb; color: #5d6b82; }
[data-theme="white"] .admin-table td { color: #2b3850; border-bottom-color: rgba(15, 23, 42, .07); }
[data-theme="white"] .stat-card { background: #fff; }
[data-theme="white"] .stat-value { color: #101a2e; }

/* Align dashboard header with the content column on wide screens */
@media (min-width: 1200px) {
  body.admin-body .admin-header {
    padding-left: max(28px, calc((100vw - 1500px) / 2));
    padding-right: max(28px, calc((100vw - 1500px) / 2));
  }
  body.admin-body .admin-main {
    width: min(1500px, 100%);
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Admin modal/toasts above sticky header */
body.admin-body .modal { z-index: 1000 !important; }
body.admin-body #toasts { z-index: 1100 !important; }

/* TV admin scaling (10-foot UI) */
html[data-device="tv"] body.admin-body { font-size: 16px; }
html[data-device="tv"] .admin-main { width: min(1760px, 100%); max-width: 1760px; padding-top: 30px; }
html[data-device="tv"] .admin-brand strong { font-size: 28px; }
html[data-device="tv"] .admin-tabs button { height: 44px; padding: 0 20px; font-size: 16px; }
html[data-device="tv"] .stat-label { font-size: 12px; }
html[data-device="tv"] .stat-value { font-size: 38px; }
html[data-device="tv"] .stat-sub { font-size: 13px; }
html[data-device="tv"] .admin-table { font-size: 15px; }
html[data-device="tv"] .admin-table th { font-size: 11px; padding: 13px 15px; }
html[data-device="tv"] .admin-table td { padding: 13px 15px; }
html[data-device="tv"] .admin-toolbar input, html[data-device="tv"] .admin-toolbar select { height: 42px; font-size: 15px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-shell { animation: none !important; }
  .auth-feats li, .auth-tabs button, .btn-submit, .stat-card, .admin-tabs button, .admin-table tbody tr { transition: none !important; }
}

/* Light theme contrast polish */
[data-theme="white"] .auth-tabs { background: #e9eef7; border-color: rgba(15,23,42,.10); }
[data-theme="white"] .auth-tabs button { color: #52617a; }
[data-theme="white"] .auth-tabs button:hover { color: #172033; }
[data-theme="white"] .auth-tabs button.active { color: #fff; }
[data-theme="white"] .auth-chip { background: #fff; border-color: rgba(15,23,42,.10); color: #40516b; }
[data-theme="white"] .auth-chip.gold { color: #8a6314; }
[data-theme="white"] .auth-chip.blue { color: #31578f; }
[data-theme="white"] .auth-feats li { background: #fff; border-color: rgba(15,23,42,.09); color: #5d6980; }
[data-theme="white"] .auth-feats span b { color: #172033; }
[data-theme="white"] .auth-feats li > b.ic { background: #f2f5fa; color: #31405a; border-color: rgba(15,23,42,.10); }
[data-theme="white"] .auth-hero-foot { color: #6b778c; border-top-color: rgba(15,23,42,.09); }
[data-theme="white"] .auth-hero-foot b { color: #3c4a62; }
[data-theme="white"] .auth-form-note { color: #6b778c; }
[data-theme="white"] .auth-form-note b { color: #45546d; }
[data-theme="white"] .auth-box .hint { color: #66738a; }
[data-theme="white"] .auth-box .hint a { color: #2f6ef0; }
[data-theme="white"] .about-box { background: #fff; border-color: rgba(15,23,42,.09); }
[data-theme="white"] .about-box summary { color: #52617a; }
[data-theme="white"] .about-box .about-body { color: #66738a; }
[data-theme="white"] .about-box .about-body b { color: #26354d; }
[data-theme="white"] .auth-theme { background: #fff; border-color: rgba(15,23,42,.12); color: #52617a; }

/* Mobile login/admin: 16px inputs => no iOS autozoom. */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea { font-size: 16px !important; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select { min-height: 44px !important; }
  .auth-box, .admin-main { overflow-x: hidden; }
}

/* touch targets for admin billing/access on coarse pointer */
@media (pointer: coarse){.admin-panel input,.admin-panel select,.admin-panel textarea,.admin-panel .btn,.admin-tabs button{min-height:44px}}


/* Mobile admin: контраст тач-табов, скролл таблиц, кнопки */
@media (max-width: 640px) {
  .admin-tabs {
    background: rgba(255, 255, 255, .035) !important;
    border-color: rgba(255, 255, 255, .09) !important;
  }
  .admin-tabs button { color: #9aa8bd !important; min-height: 42px; }
  .admin-tabs button.active { color: #fff !important; }
  .admin-header-actions .btn { min-height: 40px; }
  .admin-table .btn.sm { height: 32px; }
  .admin-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-toolbar input[type="search"], .admin-toolbar select { min-height: 40px; }
}

/* Auth/buy touch targets on phone/tablet */
@media (max-width: 900px) {
  .auth-theme, #authTheme { height: 44px !important; min-height: 44px; padding: 0 14px; font-size: 12px; }
  .auth-tabs button { min-height: 48px; }
  .auth-hint a, #forgotBtn { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 900px) {
  .buy-theme, .buy-top-link { height: 44px !important; min-height: 44px; font-size: 12px; padding: 0 12px; }
  .buy-foot a { min-height: 36px; display: inline-flex; align-items: center; }
}


/* AUTH-ABOUT (2026-11-19): блок «Про нас» винесено з .auth-shell, щоб довгий
   опис не обрізався overflow:hidden сітки. Тримаємо ту саму ширину, що й shell. */
body.auth-body { flex-direction: column; gap: 14px; justify-content: flex-start !important; }
body.auth-body > .about-box {
  flex: 0 0 auto;
  width: min(1180px, 96vw);
  margin: 0;
  align-self: center;
  border: 1px solid var(--aa-line);
  border-radius: 14px;
  background: rgba(8, 11, 17, .82);
  overflow: visible;
}
body.auth-body > .about-box .about-body { padding-bottom: 12px; }
@media (max-width: 860px) {
  body.auth-body > .about-box { width: min(920px, 100%); border-radius: 12px; }
}
html[data-device="mobile"] body.auth-body > .about-box { width: 100%; border-radius: 12px; }
html[data-device="tv"] body.auth-body > .about-box { width: min(1460px, 96vw); border-radius: 18px; }
[data-theme="white"] body.auth-body > .about-box { background: rgba(255, 255, 255, .94); }



/* ── Registration / invite purchase info (login.html) ───────────────────── */
.reg-pay-info {
  display: none;
  width: min(1180px, 96vw);
  margin: 0 auto 22px;
  padding: 24px 26px;
  border: 1px solid var(--aa-line);
  border-radius: 20px;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(77,141,255,.10), transparent 62%),
    linear-gradient(180deg, rgba(13,18,27,.96), rgba(8,11,17,.96));
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  color: var(--aa-text);
}
.reg-pay-info.visible { display: block; }
.reg-pay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.reg-pay-head h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.25px; color: #eef3fb; }
.reg-pay-head p { margin: 0; max-width: 760px; color: var(--aa-dim); font-size: 12px; line-height: 1.6; }
.reg-pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reg-pay-actions .btn { min-height: 38px; text-decoration: none; }
.reg-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.reg-pay-card { border: 1px solid var(--aa-line); border-radius: 13px; background: rgba(255,255,255,.025); padding: 14px 15px; min-width: 0; }
.reg-pay-card h4 { margin: 0 0 8px; font-size: 12.5px; color: #dbe5f4; letter-spacing: .2px; }
.reg-pay-card p, .reg-pay-card li { color: #8e99ab; font-size: 11.5px; line-height: 1.58; overflow-wrap: anywhere; }
.reg-pay-card p { margin: 0; }
.reg-pay-card ol, .reg-pay-card ul { margin: 0; padding-left: 18px; }
.reg-pay-card li + li { margin-top: 3px; }
.reg-pay-card b { color: #c8d6ea; }
.reg-pay-note { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--aa-line); color: #6f7c90; font-size: 10.5px; line-height: 1.55; }
@media (max-width: 860px) {
  .reg-pay-info { width: min(920px, 100%); padding: 18px 16px; border-radius: 14px; }
  .reg-pay-head h3 { font-size: 17px; }
  .reg-pay-grid { grid-template-columns: 1fr; }
  .reg-pay-actions { width: 100%; }
  .reg-pay-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 520px) {
  .reg-pay-info { width: 100%; margin-bottom: 14px; padding: 15px 12px; }
  .reg-pay-head h3 { font-size: 16px; }
  .reg-pay-head p { font-size: 11.5px; }
  .reg-pay-card { padding: 12px; }
  .reg-pay-actions { flex-direction: column; }
  .reg-pay-actions .btn { width: 100%; min-height: 46px; }
}
html[data-device="tv"] .reg-pay-info { width: min(1460px, 96vw); padding: 34px 38px; border-radius: 24px; }
html[data-device="tv"] .reg-pay-head h3 { font-size: 28px; }
html[data-device="tv"] .reg-pay-head p, html[data-device="tv"] .reg-pay-card p,
html[data-device="tv"] .reg-pay-card li { font-size: 16px; }
html[data-device="tv"] .reg-pay-card h4 { font-size: 18px; }
html[data-device="tv"] .reg-pay-note { font-size: 14px; }

/* Registration details follow the form, before «Про нас». */
body.auth-body > .reg-pay-info { order: 2; }
body.auth-body > .about-box { order: 3; }

@media (min-width: 1600px) {
  body.auth-body > .reg-pay-info,
  body.auth-body > .about-box { width: min(1320px, 94vw); }
}

/* ═══════════════ PHASE 1 — LOGS PANEL ═══════════════ */
.logs-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:10px;margin-top:8px}
.logs-tree{border:1px solid var(--aa-line);border-radius:9px;background:rgba(0,0,0,.16);padding:7px;max-height:58vh;overflow:auto}
.logs-service{margin:4px 0 7px}
.logs-service>b{display:block;color:var(--aa-text);font-size:11px;text-transform:uppercase;letter-spacing:.06em;margin:3px 4px}
.logs-file{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--aa-dim);font:10.5px/1.35 ui-monospace,Consolas,monospace;padding:5px 7px;border-radius:5px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.logs-file:hover{background:rgba(255,255,255,.06);color:var(--aa-text)}
.logs-file.active{background:rgba(77,141,255,.16);color:#bcd4ff}
.logs-file .sz{float:right;color:var(--aa-dim);font-size:9px;margin-left:8px}
.logs-main{min-width:0;border:1px solid var(--aa-line);border-radius:9px;background:rgba(0,0,0,.13);padding:8px}
.logs-head{display:flex;gap:8px;align-items:baseline;min-width:0;margin-bottom:6px}
.logs-head b{font-size:12px;color:var(--aa-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.logs-head .hint{margin-left:auto;font-size:10px;color:var(--aa-dim);white-space:nowrap}
.logs-viewer{max-height:55vh;overflow:auto;font:10.5px/1.45 ui-monospace,Consolas,monospace;border-top:1px solid var(--aa-line);padding-top:6px}
.log-entry{padding:5px 7px;border-left:2px solid transparent;border-bottom:1px solid rgba(255,255,255,.045);white-space:pre-wrap;overflow-wrap:anywhere}
.log-entry.error{border-left-color:var(--aa-red);background:rgba(240,69,90,.07)}
.log-entry.warn{border-left-color:#f5b83d;background:rgba(245,184,61,.05)}
.log-ts{color:var(--aa-dim);font-size:9.5px;margin-right:6px}
.log-level{font-weight:700;font-size:9px;margin-right:6px;text-transform:uppercase}
.log-level.error{color:var(--aa-red)} .log-level.warn{color:#f5b83d} .log-level.info{color:var(--aa-dim)}
.log-message{color:#ff8b97;font-weight:600}
.log-cause{color:#78adff;margin-top:2px}
.log-solution{color:#4fe0a8;margin-top:2px}
.log-context{color:var(--aa-dim);font-size:9.5px;margin-top:2px;white-space:pre-wrap}
.log-actions{margin-top:4px}
.logs-fix-wrap{margin-top:12px;border:1px solid var(--aa-line);border-radius:9px;padding:8px;background:rgba(0,0,0,.12)}
.logs-fix-wrap .logs-head{margin-bottom:5px}
#logsFixList{max-height:180px;overflow:auto;font-size:11px}
#logsFixList .fx{padding:5px 6px;border-bottom:1px solid var(--aa-line)}
#logsFixList .fx b{color:#ffb2ba} #logsFixList .fx span{color:#78adff}
@media(max-width:760px){.logs-layout{grid-template-columns:1fr}.logs-tree{max-height:180px}.logs-viewer{max-height:52vh}}

/* ═══════════════════════════════════════════════════════════════════
   OPS CONSOLE (2026-11-29): sidebar + topbar + compact KPI strip
   Scope: admin.html only. Existing admin.js tab IDs stay unchanged.
   ═══════════════════════════════════════════════════════════════════ */
body.admin-body { padding: 0; overflow-y: auto; }
.admin-app { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.admin-sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 18px; padding: 18px 14px 14px;
  border-right: 1px solid var(--aa-line);
  background: linear-gradient(180deg, rgba(8, 12, 18, .96), rgba(6, 9, 14, .92));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  overflow-y: auto; z-index: 120;
}
.admin-sidebar-brand { padding: 2px 8px 14px; border-bottom: 1px solid var(--aa-line); }
.admin-sidebar-brand .admin-brand { flex-wrap: wrap; row-gap: 6px; }
.admin-sidebar-brand .admin-brand strong { font-size: 17px; }
.admin-sidebar-brand .admin-sub { display: block; padding: 7px 0 0; border: 0; font-size: 9px; letter-spacing: 1.4px; }
.admin-nav { display: flex; flex-direction: column; gap: 16px; }
.admin-nav-group { display: flex; flex-direction: column; gap: 3px; }
.admin-nav-label { padding: 0 10px 5px; color: #5f6b7f; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.admin-nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: #94a0b3;
  font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left;
  white-space: nowrap; cursor: pointer; transition: background .16s, color .16s;
}
.admin-nav-item:hover { background: rgba(255, 255, 255, .045); color: #e7eefb; }
.admin-nav-item.active { background: linear-gradient(90deg, rgba(77, 141, 255, .22), rgba(77, 141, 255, .07)); color: #fff; box-shadow: inset 2px 0 0 var(--aa-blue); }
.admin-nav-ico { width: 18px; flex: 0 0 18px; text-align: center; font-size: 13px; }
.admin-sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 10px 2px; border-top: 1px solid var(--aa-line); color: #7f8a9c; font-size: 9.5px; letter-spacing: .4px; }
.admin-sidebar-foot b { display: block; color: #a9e7cf; font-size: 9px; letter-spacing: 1.1px; }
.admin-sidebar-foot span { display: block; font-size: 9.5px; }
.admin-env-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--aa-green); box-shadow: 0 0 8px rgba(20, 183, 125, .8); }
.admin-workspace { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 110;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px;
  padding: 10px 22px; border-bottom: 1px solid var(--aa-line);
  background: rgba(6, 9, 14, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.admin-topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-menu-btn { display: none; align-items: center; justify-content: center; width: 32px; height: 30px; padding: 0; border: 1px solid var(--aa-line); border-radius: 8px; background: rgba(255, 255, 255, .035); color: #dbe5f4; font-size: 15px; cursor: pointer; }
.admin-menu-btn:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .065); }
.admin-env-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid rgba(20, 183, 125, .3); border-radius: 999px; background: rgba(20, 183, 125, .08); color: #9fe7c9; font-size: 9px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.admin-topbar-title { color: #667185; font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-topbar .admin-header-actions { flex: 0 1 auto; flex-wrap: nowrap; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.admin-topbar .admin-header-actions::-webkit-scrollbar { display: none; }
.admin-topbar .admin-header-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; white-space: nowrap; }
.admin-main { width: 100%; max-width: 1560px; margin: 0 auto; padding: 22px 28px 64px; gap: 16px; }
.admin-page-head { order: -1; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 -2px; }
.admin-page-head h1 { margin: 0; color: #f2f6ff; font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.admin-page-sub { margin: 5px 0 0; color: #7e899b; font-size: 11.5px; line-height: 1.45; }
.admin-page-meta { display: inline-flex; align-items: center; gap: 7px; color: #748096; font-size: 10px; font-weight: 600; letter-spacing: .4px; white-space: nowrap; }
.admin-kpi-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.admin-kpi-strip .stat-card { min-height: 88px; padding: 13px 14px 12px; border-radius: 12px; }
.admin-kpi-strip .stat-label { font-size: 9px; letter-spacing: 1.05px; }
.admin-kpi-strip .stat-value { margin: 6px 0 3px; font-size: 24px; }
.admin-kpi-strip .stat-sub { font-size: 10px; }
.admin-overlay { display: none; }

@media (max-width: 1180px) {
  .admin-app { grid-template-columns: 224px minmax(0, 1fr); }
  .admin-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-main { padding: 20px 20px 56px; }
}
@media (max-width: 900px) {
  .admin-app { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; max-width: 86vw; height: 100dvh; transform: translateX(-104%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 24px 0 60px rgba(0, 0, 0, .55); }
  .admin-body.admin-nav-open .admin-sidebar { transform: translateX(0); visibility: visible; transition: transform .2s ease, visibility 0s linear 0s; }
  .admin-body.admin-nav-open { overflow: hidden; }
  .admin-overlay { display: block; position: fixed; inset: 0; z-index: 115; background: rgba(0, 0, 0, .58); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .admin-body.admin-nav-open .admin-overlay { opacity: 1; pointer-events: auto; }
  .admin-menu-btn { display: inline-flex; }
  .admin-topbar { padding: 9px 12px; }
  .admin-topbar-title { display: none; }
  .admin-topbar .admin-header-actions { flex: 1 1 auto; justify-content: flex-end; }
  .admin-main { padding: 14px 12px 46px; }
  .admin-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-kpi-strip .stat-card:last-child { grid-column: 1 / -1; }
  .admin-page-head { align-items: flex-start; }
  .admin-page-meta { display: none; }
}
@media (max-width: 560px) {
  .admin-env-pill { display: none; }
  .admin-topbar .admin-header-actions { gap: 5px; }
  .admin-topbar .admin-header-actions .btn { height: 28px; padding: 0 7px; font-size: 10px; }
  .admin-page-head h1 { font-size: 19px; }
  .admin-page-sub { font-size: 11px; }
  .admin-kpi-strip { gap: 8px; }
  .admin-kpi-strip .stat-card { min-height: 82px; padding: 11px 12px; }
  .admin-kpi-strip .stat-value { font-size: 22px; }
}
[data-theme="white"] .admin-sidebar { background: linear-gradient(180deg, #fff, #f5f8fc); border-right-color: rgba(15, 23, 42, .1); }
[data-theme="white"] .admin-sidebar-brand { border-bottom-color: rgba(15, 23, 42, .08); }
[data-theme="white"] .admin-nav-label { color: #77849a; }
[data-theme="white"] .admin-nav-item { color: #52617a; }
[data-theme="white"] .admin-nav-item:hover { background: rgba(15, 23, 42, .05); color: #1e2a3e; }
[data-theme="white"] .admin-nav-item.active { background: linear-gradient(90deg, rgba(47, 110, 240, .14), rgba(47, 110, 240, .04)); color: #1d4ed8; box-shadow: inset 2px 0 0 #2f6ef0; }
[data-theme="white"] .admin-sidebar-foot { border-top-color: rgba(15, 23, 42, .08); color: #66738a; }
[data-theme="white"] .admin-topbar { background: rgba(255, 255, 255, .9); border-bottom-color: rgba(15, 23, 42, .08); }
[data-theme="white"] .admin-topbar-title { color: #77849a; }
[data-theme="white"] .admin-page-head h1 { color: #1d2a3f; }
[data-theme="white"] .admin-page-sub, [data-theme="white"] .admin-page-meta { color: #66738a; }
[data-theme="white"] .admin-menu-btn { color: #334155; background: #fff; border-color: rgba(15, 23, 42, .12); }
html[data-device="tv"] .admin-nav-item { min-height: 44px; font-size: 15px; }
html[data-device="tv"] .admin-kpi-strip .stat-value { font-size: 28px; }
@media (pointer: coarse) { .admin-nav-item { min-height: 44px; } }

/* Ops-console refinements (mobile toolbar, light theme, table readability) */
@media (max-width: 900px) {
  .admin-topbar .admin-header-actions { justify-content: flex-start; }
  .admin-panel .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-panel .admin-toolbar > * { width: 100% !important; max-width: 100%; flex: 0 0 auto !important; }
  .admin-panel .admin-toolbar input[type="search"] { min-width: 0; max-width: none; }
  .admin-panel .admin-toolbar select,
  .admin-panel .admin-toolbar input[type="search"] { min-width: 0; }
  .admin-table { min-width: 720px; }
}
[data-theme="white"] .admin-header-actions .btn,
[data-theme="white"] .admin-toolbar .btn,
[data-theme="white"] .admin-create .btn {
  background: #fff; border-color: rgba(15, 23, 42, .14); color: #334155;
}
[data-theme="white"] .admin-header-actions .btn:hover,
[data-theme="white"] .admin-toolbar .btn:hover,
[data-theme="white"] .admin-create .btn:hover {
  background: #f1f5fb; border-color: rgba(15, 23, 42, .22); color: #0f172a;
}
[data-theme="white"] .admin-header-actions .btn.main,
[data-theme="white"] .admin-toolbar .btn.main,
[data-theme="white"] .admin-create .btn.main {
  background: linear-gradient(180deg, #5b98ff, var(--aa-blue2)); border-color: rgba(47, 110, 240, .8); color: #fff;
}
[data-theme="white"] .admin-sidebar-foot b { color: #0f8a62; }
[data-theme="white"] .admin-sidebar-foot span { color: #66738a; }
[data-theme="white"] .admin-env-pill { color: #146c4f; background: rgba(20, 183, 125, .10); border-color: rgba(20, 183, 125, .28); }
[data-theme="white"] .admin-hint, [data-theme="white"] .admin-page-sub { color: #66738a; }
[data-theme="white"] .admin-table code,
[data-theme="white"] .admin-hint code,
[data-theme="white"] .code-copy { color: #1d4ed8; }
[data-theme="white"] .code-copy { background: rgba(47, 110, 240, .08); }
@media (min-width: 901px) {
  body.admin-body #toasts { left: auto; right: 20px; bottom: 20px; }
}

@media (max-width: 560px) {
  .admin-topbar .admin-btn-label { display: none; }
  .admin-topbar .admin-header-actions .btn { min-width: 34px; padding: 0 9px; justify-content: center; }
  .admin-topbar .admin-btn-ico { font-size: 14px; line-height: 1; }
}
