/* ═════════════════════════════════════════════════════════════════════ */
/*  ИНЖЕНЕРНЫЕ РЕШЕНИЯ — ГАЗОРАСПРЕДЕЛИТЕЛЬНАЯ ОРГАНИЗАЦИЯ (ГРО)         */
/*  УЛЬТРА-ПРЕМИАЛЬНЫЙ 3D EXECUTIVE ДИЗАЙН-КОД «КОНТЕНТ-ЗАВОД»           */
/* ═════════════════════════════════════════════════════════════════════ */

:root {
  /* Фирменная палитра бренда «Инженерные решения» */
  --brand: #FFCC00;
  --brand-light: #FFE066;
  --brand-hover: #FFD633;
  --brand-glow: rgba(255, 204, 0, 0.4);
  --brand-glow-lg: 0 0 35px rgba(255, 204, 0, 0.5);
  --brand-subtle: rgba(255, 204, 0, 0.08);
  --brand-border: rgba(255, 204, 0, 0.35);
  --brand-ink: #111317;

  /* Индустриальный темный графит / Deep Slate CAD */
  --canvas: #0C0E12;
  --paper: #11141A;
  --surface: #151921;
  --surface-card: #1B202A;
  --surface-elevated: #212734;
  --surface-hover: #293140;
  --surface-inset: #090B0E;

  /* Границы и разделители */
  --line: #242B37;
  --line-soft: #1A1F28;
  --line-bright: #364052;
  --line-gold: rgba(255, 204, 0, 0.35);

  /* 3D-фаски и многослойные тени (CNC Milled 3D) */
  --bevel-top: inset 0 1px 1px 0 rgba(255, 255, 255, 0.14);
  --bevel-bottom: inset 0 -1px 1px 0 rgba(0, 0, 0, 0.8);
  --bevel-gold: inset 0 1px 0 0 rgba(255, 240, 150, 0.55), inset 0 -1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-3d-sm: 0 4px 14px -2px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-3d-md: 0 12px 30px -4px rgba(0, 0, 0, 0.78), 0 4px 12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.6);
  --shadow-3d-lg: 0 22px 50px -10px rgba(0, 0, 0, 0.88), 0 8px 20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);

  /* Текст и типографика */
  --ink: #E5EBF4;
  --ink-1: #FFFFFF;
  --ink-2: #9EABBD;
  --ink-3: #687588;
  --ink-gold: #FFCC00;

  /* Статусы и сигнальные цвета */
  --ok: #16A34A;
  --ok-ink: #22C55E;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --ok-border: rgba(34, 197, 94, 0.35);

  --warn: #EAB308;
  --warn-ink: #FACC15;
  --warn-bg: rgba(234, 179, 8, 0.12);
  --warn-border: rgba(234, 179, 8, 0.35);

  --bad: #EF4444;
  --bad-ink: #F87171;
  --bad-bg: rgba(239, 68, 68, 0.12);
  --bad-border: rgba(239, 68, 68, 0.35);

  --blue: #0284C7;
  --blue-light: #38BDF8;
  --blue-bg: rgba(56, 189, 248, 0.12);

  /* Сайдбар и шапка */
  --chrome-side-bg: #101318;
  --chrome-side-ink: #E5EBF4;
  --chrome-side-active-bg: linear-gradient(90deg, rgba(255, 204, 0, 0.16) 0%, rgba(255, 204, 0, 0.02) 100%);
  --chrome-side-active-ink: #FFFFFF;
  --chrome-side-line: #1F2530;
  --chrome-logo-bg: #FFCC00;
  --chrome-logo-ink: #111317;

  /* Каналы вещания */
  --ch-tg: #2AABEE;
  --ch-max: #FFB703;
  --ch-wa: #25D366;
  --ch-dzen: #FF4438;
  --ch-vk: #0077FF;

  /* Радиусы и шрифты */
  --r-xs: 4px;
  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 14px;
  --r-pill: 9999px;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Cascadia Code', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Фоновая чертежная CAD-сетка с объемным освещением */
body {
  background-image: 
    linear-gradient(rgba(255, 204, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 204, 0, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
  background-position: -1px -1px;
  background-attachment: fixed;
}

.mono, .num, .tabnum {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
a { color: var(--blue-light); text-decoration: none; }

/* ══════════════════════════════════════════════ */
/*  SHELL & ЛЕВЫЙ САЙДБАР (3D МОНОЛИТ)            */
/* ══════════════════════════════════════════════ */
.shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 260px;
  flex: none;
  border-right: 1px solid var(--chrome-side-line);
  background: linear-gradient(180deg, #13171F 0%, #0E1015 100%);
  color: var(--chrome-side-ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  user-select: none;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.65);
}

/* Фирменный 3D-блок бренда «Инженерные решения» (ГРО) */
.side-brand-panel {
  padding: 18px 16px 16px;
  background: linear-gradient(160deg, #181D26 0%, #101318 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-shield-svg {
  width: 62px;
  height: 62px;
  flex: none;
  filter: drop-shadow(0 6px 16px rgba(255, 204, 0, 0.35));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-shield-svg:hover {
  transform: scale(1.05) rotate(1deg);
}

.brand-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-gro-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  color: var(--brand);
  line-height: 1.22;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
}

.brand-sub-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  border-radius: var(--r-sm);
  font-size: 10px;
}

.status-cad-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  position: relative;
}

.status-cad-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--brand);
  animation: radarRing 2.2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes radarRing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

.sub-badge-title {
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #FFFFFF;
}

.sub-badge-code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--brand);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.side-logo {
  display: none;
}

/* Навигация в сайдбаре */
.side-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 18px;
}

.side-group-title {
  padding: 14px 18px 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
  opacity: 0.7;
}

.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 3px 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.18s ease;
  user-select: none;
  color: var(--ink-2);
}

.side-item svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  transition: color 0.18s ease, transform 0.18s ease;
}

.side-item .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.side-item .count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.side-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  transform: translateX(2px);
}

.side-item:hover svg {
  color: var(--brand);
  transform: scale(1.1);
}

.side-item.active {
  background: var(--chrome-side-active-bg);
  color: #FFFFFF;
  border-left-color: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(255, 204, 0, 0.18);
}

.side-item.active svg {
  color: var(--brand);
}

.side-item.active .count {
  background: rgba(255, 204, 0, 0.18);
  border-color: var(--brand-border);
  color: var(--brand);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.25);
}

/* ══════════════════════════════════════════════ */
/*  MAIN VIEW CONTAINER & ЖИВАЯ АУРА              */
/* ══════════════════════════════════════════════ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

/* Плавающий переливающийся источник золотого света */
.main::before {
  content: "";
  position: absolute;
  top: -120px;
  right: 5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.065) 0%, rgba(56, 189, 248, 0.025) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: auraFloat 14s infinite alternate ease-in-out;
}

@keyframes auraFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0.65; }
  100% { transform: translate(-100px, 80px) scale(1.15); opacity: 0.95; }
}

.view-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 32px 48px;
  position: relative;
  z-index: 1;
}

.view-panel.active {
  display: flex;
  flex-direction: column;
  animation: viewFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.view-title-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.view-sub {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.sec-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.25);
}

.sec-label::before {
  content: "//";
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════ */
/*  КНОПКИ И ПЕРЕЛИВАНИЯ (3D SHIMMER)             */
/* ══════════════════════════════════════════════ */
.btn {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, #1C212A 0%, #13171F 100%);
  color: var(--ink);
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: var(--shadow-3d-sm);
  position: relative;
}

.btn svg {
  flex: none;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(160deg, #242B36 0%, #171C26 100%);
  border-color: var(--line-bright);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ГЛАВНЫЙ АКЦЕНТНЫЙ CTA: ПЕРЕЛИВАНИЕ ЗОЛОТА (LIQUID GOLD SHIMMER) */
.btn-accent {
  background: linear-gradient(135deg, #FFE066 0%, #FFCC00 45%, #E5B200 100%);
  color: #111317;
  border: 1px solid #FFE066;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 22px rgba(255, 204, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.65), inset 0 -2px 3px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-accent svg {
  color: #111317;
}

/* Анимированный световой блик переливания */
.btn-accent::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: liquidShimmer 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes liquidShimmer {
  0% { transform: translateX(-120%) skewX(-20deg); }
  25% { transform: translateX(260%) skewX(-20deg); }
  100% { transform: translateX(260%) skewX(-20deg); }
}

.btn-accent:hover:not(:disabled) {
  background: linear-gradient(135deg, #FFF099 0%, #FFD633 45%, #F0BA00 100%);
  box-shadow: 0 0 34px rgba(255, 204, 0, 0.7), 0 8px 24px rgba(255, 204, 0, 0.5), inset 0 1px 2px #FFFFFF;
  transform: translateY(-2px) scale(1.01);
}

.btn-accent:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(255, 204, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(160deg, #202735 0%, #151A24 100%);
  color: var(--brand);
  border-color: var(--brand-border);
  font-weight: 700;
  box-shadow: var(--shadow-3d-sm);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(160deg, rgba(255, 204, 0, 0.18) 0%, rgba(255, 204, 0, 0.04) 100%);
  border-color: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger {
  border-color: var(--bad-border);
  color: var(--bad-ink);
  background: var(--bad-bg);
}

.btn-danger:hover:not(:disabled) {
  background: var(--bad);
  color: #FFFFFF;
  border-color: var(--bad);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════════════ */
/*  VIEW 1: ДАШБОРД (3D ПРИБОРНАЯ ПАНЕЛЬ)         */
/* ══════════════════════════════════════════════ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  margin-bottom: 24px;
  background: linear-gradient(160deg, #1A1F28 0%, #11141A 100%);
  box-shadow: var(--shadow-3d-md);
  overflow: hidden;
  position: relative;
}

.kpi-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-cell:last-child {
  border-right: none;
}

/* Верхняя световая полоса на каждой ячейке */
.kpi-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.6;
  transition: all 0.25s ease;
}

.kpi-cell:hover {
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
  transform: translateY(-3px) translateZ(0);
}

.kpi-cell:hover::before {
  left: 0;
  right: 0;
  opacity: 1;
  box-shadow: 0 0 12px var(--brand);
}

.kpi-cell .lbl {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-cell .val {
  font-size: 30px;
  font-weight: 900;
  margin-top: 6px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.kpi-cell .val.num {
  color: var(--brand);
  text-shadow: 0 2px 14px rgba(255, 204, 0, 0.45), 0 0 28px rgba(255, 204, 0, 0.2);
  letter-spacing: -0.02em;
}

.kpi-cell .val .sub-of {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-left: 5px;
}

/* Таблица очереди публикаций */
.table-block {
  background: linear-gradient(170deg, #171C25 0%, #11141A 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: var(--shadow-3d-md);
}

.industrial-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.industrial-table thead th {
  background: #11141A;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 900;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.industrial-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
  transition: all 0.15s ease;
}

.industrial-table tbody tr:last-child {
  border-bottom: none;
}

.industrial-table tbody tr:hover {
  background: rgba(255, 204, 0, 0.04);
  box-shadow: inset 2px 0 0 var(--brand);
}

.industrial-table td {
  padding: 13px 18px;
  vertical-align: middle;
  font-size: 13px;
}

.td-channel {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.ch-strip {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 0 8px currentColor;
}

.td-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.td-post-title {
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
}

.badge-status, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid;
  white-space: nowrap;
  box-shadow: var(--shadow-3d-sm);
}

.badge-status.scheduled, .status-badge.scheduled {
  border-color: var(--blue-light);
  color: var(--blue-light);
  background: var(--blue-bg);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.badge-status.published, .status-badge.published {
  border-color: var(--ok-ink);
  color: var(--ok-ink);
  background: var(--ok-bg);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.badge-status.draft, .status-badge.draft {
  border-color: var(--ink-3);
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
}

/* Блок Ботов на дашборде (3D Станции) */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.bot-panel {
  background: linear-gradient(160deg, #1C212A 0%, #12151C 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-3d-md);
}

.bot-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent 70%);
  opacity: 0.8;
}

.bot-panel:hover {
  border-color: var(--line-gold);
  box-shadow: var(--shadow-3d-lg), 0 0 30px rgba(255, 204, 0, 0.22);
  transform: translateY(-4px) scale(1.008);
}

.bot-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bot-tile {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.15) 0%, rgba(255, 204, 0, 0.03) 100%);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-3d-sm), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--brand);
}

.bot-tile svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 6px rgba(255, 204, 0, 0.3));
}

.bot-panel-info {
  flex: 1;
  min-width: 0;
}

.bot-panel-name {
  font-weight: 900;
  font-size: 16px;
  color: #FFFFFF;
}

.bot-panel-desc {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.4;
}

.bot-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  border: 1px solid;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bot-pill.online {
  border-color: var(--ok-ink);
  color: var(--ok-ink);
  background: var(--ok-bg);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.28);
}

/* ══════════════════════════════════════════════ */
/*  VIEW 2: ЛЕНТА ПУБЛИКАЦИЙ                      */
/* ══════════════════════════════════════════════ */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.pills-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  background: linear-gradient(160deg, #1A1F28 0%, #12151C 100%);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-3d-sm);
}

.filter-pill:hover {
  color: #FFFFFF;
  border-color: var(--line-bright);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, #FFE066 0%, #FFCC00 50%, #E5B200 100%);
  color: #111317;
  border-color: #FFE066;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(255, 204, 0, 0.35), inset 0 1px 1px #FFFFFF;
}

.ch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box input {
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  color: var(--ink);
  font-size: 12.5px;
  width: 260px;
  outline: none;
  transition: border-color 0.18s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search-input-box input:focus {
  border-color: var(--brand);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 0 14px rgba(255, 204, 0, 0.35);
}

.search-input-box svg, .search-input-box i {
  position: absolute;
  left: 11px;
  color: var(--ink-3);
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.feed-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.reg-card {
  background: linear-gradient(160deg, #1C212B 0%, #13171F 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-3d-md);
}

.reg-card:hover {
  border-color: var(--brand-border);
  box-shadow: var(--shadow-3d-lg), 0 0 24px rgba(255, 204, 0, 0.18);
  transform: translateY(-4px);
}

.reg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rubric-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--brand);
  background: rgba(255, 204, 0, 0.08);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--brand-border);
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-3d-sm);
}

.reg-card-title {
  font-weight: 800;
  font-size: 15px;
  color: #FFFFFF;
  line-height: 1.35;
}

.reg-card-snippet {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reg-channels-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ch-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ch-badge.telegram { background: var(--ch-tg); }
.ch-badge.max { background: var(--ch-max); color: #121417; }
.ch-badge.whatsapp { background: var(--ch-wa); }
.ch-badge.dzen { background: var(--ch-dzen); }
.ch-badge.vk { background: var(--ch-vk); }

.reg-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  margin-top: auto;
}

/* ══════════════════════════════════════════════ */
/*  VIEW 4: БОТ-РЕДАКТОР (РЕДАКЦИОННЫЙ ЦЕНТР)     */
/* ══════════════════════════════════════════════ */

/* 11 ОТРАСЛЕВЫХ РУБРИК ГАЗИФИКАЦИИ — ЛЕНТА ЧИПОВ */
.rubrics-chips-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 16px 4px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.rubrics-chips-strip::-webkit-scrollbar {
  height: 6px;
}

.rubrics-chips-strip::-webkit-scrollbar-track {
  background: var(--surface-inset);
  border-radius: 4px;
}

.rubrics-chips-strip::-webkit-scrollbar-thumb {
  background: var(--line-bright);
  border-radius: 4px;
}

.rubrics-chips-strip::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

.rubric-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  background: linear-gradient(160deg, #1C212B 0%, #13171E 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  user-select: none;
  box-shadow: var(--shadow-3d-sm);
}

.rubric-chip:hover {
  background: linear-gradient(160deg, #232936 0%, #181D26 100%);
  border-color: rgba(255, 204, 0, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 204, 0, 0.2);
}

.rubric-chip.active {
  background: linear-gradient(150deg, rgba(255, 204, 0, 0.24) 0%, rgba(255, 204, 0, 0.06) 100%), #14171E;
  border-color: var(--brand);
  box-shadow: 0 0 22px rgba(255, 204, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.rubric-chip .r-chip-cat {
  font-size: 9.5px;
  color: var(--ink-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.rubric-chip.active .r-chip-cat {
  color: var(--brand);
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.rubric-chip .r-chip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.rubric-chip.active .r-chip-title {
  color: #FFFFFF;
}

/* 7 ШАГОВ ЦИКЛА ВОРОНКИ */
.cycle-steps-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

@media (max-width: 1100px) {
  .cycle-steps-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-chip {
  background: linear-gradient(160deg, #1A1F28 0%, #12151C 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  user-select: none;
  box-shadow: var(--shadow-3d-sm);
}

.step-chip:hover {
  background: linear-gradient(160deg, #222834 0%, #171B24 100%);
  border-color: var(--line-bright);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.step-chip.active {
  border-color: var(--brand);
  background: linear-gradient(150deg, rgba(255, 204, 0, 0.18) 0%, rgba(255, 204, 0, 0.04) 100%), #14171E;
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 204, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.step-txt {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Макет Редактора (Левая и Правая колонки) */
.editor-layout {
  display: grid;
  grid-template-columns: 375px 1fr;
  gap: 22px;
}

@media (max-width: 1060px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.editor-box {
  background: linear-gradient(165deg, #1A1F29 0%, #12151C 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-3d-md);
}

.box-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 900;
  color: #FFFFFF;
}

.form-label {
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 800;
  display: block;
  margin-bottom: 7px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.18s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 204, 0, 0.35);
}

.form-textarea {
  resize: vertical;
  min-height: 105px;
  line-height: 1.5;
}

/* Кнопка генерации в левой колонке */
.btn-generate-hero {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFE766 0%, #FFCC00 45%, #D4A000 100%);
  color: #111317;
  border: 1px solid #FFF280;
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.btn-generate-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 204, 0, 0.55), inset 0 1px 0 #FFFFFF;
}
.btn-generate-hero:active {
  transform: translateY(1px);
}

/* Каналы вещания: аккуратные кнопки-переключатели */
.channel-toggles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.channel-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.channel-check-btn input[type="checkbox"] {
  accent-color: var(--brand);
  cursor: pointer;
}
.channel-check-btn:has(input:checked) {
  border-color: var(--brand-border);
  background: rgba(255, 204, 0, 0.08);
  color: #FFFFFF;
}

/* Правая колонка: Холст публикации */
.editor-canvas-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. Карточка фото (16:9) */
.editor-media-card {
  position: relative;
  background: #0A0C0F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.editor-media-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  overflow: hidden;
  background: #090B0E;
  display: flex;
  align-items: center;
  justify-content: center;
}
.editor-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.editor-media-card:hover .editor-media-img {
  transform: scale(1.02);
}

/* Верхний плавающий бар поверх фото */
.editor-media-overlay-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: auto;
}
.media-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.btn-media-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(18, 22, 29, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E5EBF4;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.btn-media-action:hover {
  background: #FFCC00;
  color: #111317;
  border-color: #FFE066;
  transform: translateY(-1px);
}

/* Нижняя плашка с промптом для генерации на фото */
.editor-media-prompt-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(8, 10, 14, 0.95) 0%, rgba(8, 10, 14, 0.75) 75%, transparent 100%);
  padding: 18px 14px 10px;
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 4;
}
.prompt-icon {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
}
.prompt-text {
  font-size: 11px;
  color: #CFD8E3;
  font-family: var(--font-mono);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. Заголовок публикации */
.editor-title-container {
  position: relative;
}
.editor-title-input {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  padding: 12px 16px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* Выпадающий список заголовков */
.headlines-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: linear-gradient(165deg, #1C212B 0%, #12151C 100%);
  border: 1px solid var(--line-bright);
  border-radius: var(--r-sm);
  padding: 10px;
  z-index: 20;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 204, 0, 0.15);
}
.headlines-dropdown-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
}
.headlines-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.headline-pick-item {
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.headline-pick-item:hover {
  background: rgba(255, 204, 0, 0.12);
  border-color: var(--brand-border);
  color: #FFFFFF;
}

/* 3. Текст публикации */
.editor-content-container {
  display: flex;
  flex-direction: column;
}
.editor-content-textarea {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  min-height: 240px;
  padding: 14px 16px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* 4. Панель действий внизу редактора */
.editor-actions-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.btn-publish-hero {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFE766 0%, #FFCC00 50%, #D4A000 100%);
  color: #111317;
  border: 1px solid #FFF280;
  border-radius: var(--r-sm);
  box-shadow: 0 4px 16px rgba(255, 204, 0, 0.35);
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-publish-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 204, 0, 0.5);
}
.btn-action-tool {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(160deg, #1D222C 0%, #13171F 100%);
  color: #E2E8F0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: var(--shadow-3d-sm);
}
.btn-action-tool:hover {
  background: linear-gradient(160deg, #28303E 0%, #1A202A 100%);
  border-color: var(--line-bright);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.btn-action-tool.active {
  border-color: var(--ok-ink);
  background: rgba(34, 197, 94, 0.14);
  color: #FFFFFF;
}
.funnel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok-ink);
  box-shadow: 0 0 8px var(--ok-ink);
}

.channel-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ch-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 13px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.ch-tab:hover {
  color: #FFFFFF;
}

.ch-tab.active {
  background: var(--surface-inset);
  border-color: var(--line);
  color: #FFFFFF;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.adaptation-preview {
  padding: 16px;
  max-height: 230px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════ */
/*  VIEW 5: БОТ-МЕНЕДЖЕР (ВОРОНКА ЛИДОВ / CRM)    */
/* ══════════════════════════════════════════════ */
.crm-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.crm-kpi-item {
  background: linear-gradient(160deg, #1C212A 0%, #12151C 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-3d-sm);
  transition: all 0.2s ease;
}

.crm-kpi-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3d-md);
  border-color: var(--line-gold);
}

.crm-kpi-item .lbl {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.crm-kpi-item .val {
  font-size: 26px;
  font-weight: 900;
  color: #FFFFFF;
  font-family: var(--font-mono);
}

.kanban-cols-wrap {
  display: grid;
  grid-template-columns: repeat(5, minmax(250px, 1fr));
  gap: 18px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-column {
  background: linear-gradient(170deg, #171C25 0%, #11141A 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  box-shadow: var(--shadow-3d-md);
}

.column-header {
  padding: 15px 18px;
  background: #11141A;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  font-size: 13px;
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.column-cards-list {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.lead-tile {
  background: linear-gradient(160deg, #1B202A 0%, #12151D 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-sm);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-3d-sm);
}

.lead-tile:hover {
  border-color: var(--brand);
  background: linear-gradient(160deg, #222935 0%, #171C25 100%);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 204, 0, 0.22);
}

.lead-tile-title {
  font-weight: 900;
  font-size: 14px;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lead-tile-comp {
  font-size: 12.5px;
  color: var(--ink-2);
}

.lead-tile-query {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.lead-tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-top: 1px solid var(--line-soft);
  padding-top: 9px;
  margin-top: 4px;
}

.stage-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ══════════════════════════════════════════════ */
/*  VIEW 6 & 7: СТАТИСТИКА И НАСТРОЙКИ            */
/* ══════════════════════════════════════════════ */
.stats-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
}

@media (max-width: 960px) {
  .stats-charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-panel-box {
  background: linear-gradient(165deg, #1A1F29 0%, #12151C 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-3d-md);
}

.chart-frame {
  position: relative;
  height: 260px;
  width: 100%;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════ */
/*  МОДАЛЬНЫЕ ОКНА И ТОСТЫ                        */
/* ══════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 11, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(14px) saturate(180%);
}

.modal-backdrop.active {
  display: flex;
}

.modal-window {
  background: linear-gradient(165deg, #1A1F28 0%, #11141A 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 204, 0, 0.15);
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-top {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #13171F;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-top h3 {
  font-size: 16.5px;
  font-weight: 900;
  color: #FFFFFF;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-content {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-bottom {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #11141B;
}

.toast-container {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: linear-gradient(160deg, #1C212A 0%, #12151D 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 5px solid var(--brand);
  border-radius: var(--r-sm);
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 204, 0, 0.25);
  min-width: 290px;
  animation: slideToast 0.22s ease-out;
}

.toast.ok { border-left-color: var(--ok-ink); }
.toast.err { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--blue-light); }

@keyframes slideToast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Скроллбары */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--line-bright);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

/* Респонсив */
@media (max-width: 860px) {
  .sidebar {
    width: 70px;
  }
  .brand-name-block,
  .brand-sub-badge,
  .side-item .label span,
  .side-group-title,
  .side-item .count {
    display: none;
  }
  .side-brand-panel {
    padding: 14px 6px;
    align-items: center;
  }
  .brand-shield-svg {
    width: 46px;
    height: 46px;
  }
}

/* AI Photo Generation UI */
.photo-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #fff;
  border-radius: var(--r-sm);
  text-align: center;
  padding: 20px;
}

.photo-loading-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255, 204, 0, 0.2);
  border-top-color: #FFCC00;
  border-radius: 50%;
  animation: photoSpin 0.9s linear infinite;
  margin-bottom: 12px;
}

@keyframes photoSpin {
  to { transform: rotate(360deg); }
}

.photo-loading-text {
  font-size: 14px;
  font-weight: 700;
  color: #FFCC00;
  margin-bottom: 6px;
}

.photo-loading-sub {
  font-size: 11.5px;
  color: #9CA3AF;
  font-family: var(--font-mono);
}

.btn-media-ai-gen {
  background: rgba(255, 204, 0, 0.15) !important;
  border-color: rgba(255, 204, 0, 0.45) !important;
  color: #FFCC00 !important;
}

.btn-media-ai-gen:hover {
  background: rgba(255, 204, 0, 0.28) !important;
  border-color: #FFCC00 !important;
  box-shadow: 0 0 16px rgba(255, 204, 0, 0.35) !important;
}