  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --ui-bg: #0b0e14;
    --ui-surface-1: #151923;
    --ui-surface-2: #1e2432;
    --ui-surface-3: #252c3d;
    --ui-border-soft: rgba(123,137,180,.18);
    --ui-border: #30384f;
    --ui-text: #eef1f8;
    --ui-text-muted: #9aa3c0;
    --ui-text-faint: #69738f;
    --ui-accent: #5b74f6;
    --ui-accent-hover: #7c8dfd;
    --ui-success: #3ee07a;
    --ui-danger: #ff6675;
    --ui-warning: #ffd84d;
    --ui-radius-sm: 8px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 16px;
    --ui-shadow-popover: 0 20px 54px rgba(0,0,0,.42);
    --ui-shadow-modal: 0 28px 80px rgba(0,0,0,.46);
    --ui-space-1: 4px;
    --ui-space-2: 8px;
    --ui-space-3: 12px;
    --ui-space-4: 16px;
    --ui-space-5: 24px;
    --bg: var(--ui-bg);
    --surface: var(--ui-surface-1);
    --surface2: var(--ui-surface-2);
    --border: var(--ui-border);
    --accent: var(--ui-accent);
    --accent2: var(--ui-accent-hover);
    --text: var(--ui-text);
    --text1: var(--ui-text);
    --text2: var(--ui-text-muted);
    --text3: var(--ui-text-faint);
    --bg1: #0b0e14;
    --bg2: #121722;
    --green: var(--ui-success);
    --red: var(--ui-danger);
    --yellow: var(--ui-warning);
    --show-bg: #171d2a;
    --card: #171d2a;
    --radius: var(--ui-radius-sm);
    --shadow: 0 18px 60px rgba(0,0,0,0.42);
  }

  body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

  /* ── ШАПКА ── */
  .header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky; top: 0; z-index: 100;
  }
  .header-logo { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
  .header-logo span { color: var(--accent2); }
  .header-logo-full { color: var(--text) !important; }
  .header-logo-short { display: none; color: var(--text) !important; }
  .header-nav { display: flex; gap: 8px; align-items: center; }
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.15s; }
  .btn-ghost { background: transparent; color: var(--text2); }
  .btn-ghost:hover { background: var(--surface2); color: var(--text); }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-primary:hover { background: var(--accent2); }
  .btn-danger { background: var(--red); color: #fff; }
  .btn-danger:hover { opacity: 0.85; }
  .btn-sm { padding: 4px 10px; font-size: 13px; }
  .btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 8px; }

  /* ── ОСНОВНОЙ КОНТЕНТ ── */
  .main { max-width: 1400px; margin: 0 auto; padding: 24px 16px; }

  /* ── НАВИГАЦИЯ ПО НЕДЕЛЯМ ── */
  .week-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
  }
  .week-title { font-size: 20px; font-weight: 700; }
  .week-note { font-size: 13px; color: var(--yellow); margin-top: 2px; }
  .week-controls { display: flex; gap: 8px; align-items: center; }

  /* ── ФИЛЬТР ПО ВЕДУЩЕМУ ── */
  .host-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
  .host-chip {
    padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border);
    cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.15s;
    color: var(--text2);
  }
  .host-chip:hover { border-color: var(--accent); color: var(--text); }
  .host-chip.active { color: #fff; border-color: transparent; }

  /* ── СЕТКА РАСПИСАНИЯ ── */
  .schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    min-width: 0;
  }
  @media (max-width: 900px)  { .schedule-grid { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 700px)  { .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 600px)  { .schedule-grid { grid-template-columns: 1fr; } }
  @media (max-width: 480px)  {
    .week-nav { flex-direction: column; align-items: flex-start; gap: 8px; }
    .host-chip { padding: 5px 10px; font-size: 12px; }
  }
  .mobile-day-nav { display: none; }
  @media (max-width: 700px) {
    .host-filter {
      gap: 6px;
      flex-wrap: nowrap;
      margin-right: -10px;
      padding: 0 10px 6px 0;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
    }
    .host-filter::-webkit-scrollbar { display: none; }
    .mobile-day-nav {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-bottom: 12px;
    }
    .mobile-day-controls {
      display: grid;
      grid-template-columns: 36px minmax(112px, 1fr) 36px;
      align-items: center;
      gap: 4px;
      margin-right: auto;
    }
    .mobile-day-controls span {
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
    }
    .mobile-toggle { display: flex; gap: 4px; margin-left: auto; }
    .mobile-toggle button {
      padding: 5px 12px; border-radius: 7px;
      border: 1px solid var(--border); background: transparent;
      color: var(--text2); font-size: 13px; cursor: pointer;
    }
    .mobile-toggle button.active { background: var(--accent); color: #fff; border-color: transparent; }
  }

  .day-col {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .day-col.is-friday  { border-color: rgba(100,120,255,0.35); background: rgba(79,110,247,0.04); }
  .day-col.is-weekend { border-color: rgba(155,89,182,0.35);  background: rgba(155,89,182,0.05); }
  .day-col.is-today-col { border-color: rgba(67,233,123,0.4) !important; }
  .day-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 1px;
  }
  .day-name { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2); }
  .day-date { font-size: 17px; font-weight: 700; }
  .day-date.weekend { color: var(--accent2); }
  .day-date.today { color: var(--green); }

  .slots { display: flex; flex-direction: column; gap: 4px; padding: 8px; }

  .slot {
    border-radius: 7px; padding: 8px 10px;
    transition: all 0.15s;
  }
  .slot-show {
    border: 1px solid color-mix(in srgb, var(--slot-accent, #d7a84a), transparent 64%);
    border-left: 3px solid var(--slot-accent, #d7a84a);
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--slot-accent, #d7a84a), transparent 87%), transparent 76%),
      rgba(30,36,50,0.78);
  }
  .slot-host {
    border: 1px solid var(--border);
    border-left: 3px solid var(--slot-accent, #6c7fff);
    background: var(--surface2);
    cursor: default;
  }
  .slot-host.dimmed { opacity: 0.25; }
  .slot-host.highlighted { border-color: currentColor; box-shadow: 0 0 0 1px currentColor; }
  .slot-time { font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }
  .slot-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; margin-top: 2px; }
  .slot-show-name { color: var(--slot-accent, #d7a84a); }
  .slot-label { font-size: 11px; color: var(--text2); margin-top: 1px; }
  .slot-penalty { font-size: 11px; color: var(--red); margin-top: 2px; }
  .slot-empty { font-size: 13px; color: var(--text2); font-style: italic; }

  /* ── ЗАМЕНА (ОТПУСК) ── */
  .slot-replacement-empty {
    border: 1px solid rgba(220, 50, 50, 0.6) !important;
    border-left: 3px solid rgba(255, 95, 109, 0.92) !important;
    background: rgba(220, 50, 50, 0.08) !important;
  }
  .slot-replacement-filled {
    border: 1px solid rgba(67, 233, 123, 0.7) !important;
    border-left: 3px solid rgba(67, 233, 123, 0.95) !important;
    background: rgba(67, 233, 123, 0.08) !important;
  }


  /* ── ЗАМЕНА В РАСПИСАНИИ ── */
  .slot-substituted {
    background: rgba(255, 193, 7, 0.08) !important;
    border-color: rgba(255, 193, 7, 0.35) !important;
  }
  .slot-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(255, 193, 7, 0.75);
    margin-top: 3px;
    cursor: default;
  }
  .slot-sub-badge .sub-icon { font-size: 11px; }

  /* ── ПУСТОЕ СОСТОЯНИЕ ── */
  .empty-state { text-align: center; padding: 80px 20px; color: var(--text2); }
  .empty-state h2 { font-size: 22px; margin-bottom: 8px; color: var(--text); }

  /* ── UI SYSTEM: переиспользуемые блоки админки ── */
  .ui-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
  }
  .ui-page-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: 0;
  }
  .ui-page-head p {
    margin: 6px 0 0;
    color: var(--text2);
    font-size: 14px;
    line-height: 1.45;
  }
  .ui-section,
  .ui-card {
    background: linear-gradient(180deg, rgba(27,32,45,0.94), rgba(18,23,34,0.94));
    border: 1px solid rgba(123,137,180,0.22);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .ui-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .ui-section-head h3,
  .ui-section-head h4 {
    margin: 0;
    color: var(--text);
    letter-spacing: 0;
  }
  .ui-toolbar,
  .ui-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .ui-grid {
    display: grid;
    gap: 12px;
  }
  .ui-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ui-help {
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .ui-divider {
    height: 1px;
    margin: 16px 0;
    background: rgba(123,137,180,0.18);
  }
  .hosts-page-actions { justify-content: flex-end; }
  .hosts-person {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .hosts-person-name { color: var(--text); font-weight: 700; }
  .hosts-person-birthday,
  .hosts-person-airname {
    color: var(--text2);
    font-size: 12px;
    font-weight: 450;
  }
  .hosts-telegram {
    margin-left: 5px;
    cursor: help;
  }
  .hosts-telegram.is-missing {
    opacity: .28;
    filter: grayscale(1);
  }
  .hosts-empty { color: var(--text2); }
  .hosts-edit-btn { margin-left: 6px; }
  .misc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .misc-card { padding: 18px; }
  .misc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 17px;
  }
  .misc-card-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    background: rgba(124,141,253,.12);
    border: 1px solid rgba(124,141,253,.2);
    border-radius: 10px;
    font-size: 17px;
  }
  .misc-card-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.3;
  }
  .misc-card-head p,
  .misc-help {
    margin: 3px 0 0;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .misc-form-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }
  .misc-field {
    display: grid;
    gap: 5px;
    color: var(--text2);
    font-size: 12px;
  }
  .misc-date-input { width: 150px; }
  .misc-week-field { min-width: 230px; }
  .misc-or { padding-bottom: 10px; color: var(--text2); font-size: 12px; }
  .misc-card-action { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
  .misc-help { margin-top: 10px; }
  .misc-error { margin-top: 9px; color: var(--red); font-size: 13px; }
  .misc-password-card { grid-column: 1 / -1; }
  .misc-export-history-card { grid-column: 1 / -1; }
  .misc-export-history-head { align-items: center; }
  .misc-export-history-head > div { flex: 1; min-width: 0; }
  .misc-export-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .misc-export-section {
    overflow: hidden;
    border: 1px solid rgba(123,137,180,.18);
    border-radius: 14px;
    background: rgba(16,20,31,.56);
  }
  .misc-export-section.tabel { border-top-color: rgba(174,186,255,.45); }
  .misc-export-section.agreement { border-top-color: rgba(255,217,120,.45); }
  .misc-export-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(123,137,180,.14);
    background: rgba(123,137,180,.05);
  }
  .misc-export-section-head h4 { margin: 0; color: var(--text); font-size: 15px; }
  .misc-export-section.tabel .misc-export-section-head h4 { color: #c4ccff; }
  .misc-export-section.agreement .misc-export-section-head h4 { color: #ffe49a; }
  .misc-export-section-head p { margin: 2px 0 0; color: var(--text2); font-size: 11px; }
  .misc-export-section-empty { padding: 18px 14px; color: var(--text2); font-size: 12px; text-align: center; }
  .misc-export-periods { display: grid; }
  .misc-export-period-group + .misc-export-period-group { border-top: 1px solid rgba(123,137,180,.13); }
  .misc-export-period-group > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }
  .misc-export-period-group > summary::-webkit-details-marker { display: none; }
  .misc-export-period-group > summary::after { content: '⌄'; color: var(--text2); font-size: 16px; line-height: 1; }
  .misc-export-period-group[open] > summary::after { transform: rotate(180deg); }
  .misc-export-period-group > summary:hover { background: rgba(123,137,180,.055); }
  .misc-export-period-title { display: grid; gap: 2px; min-width: 0; }
  .misc-export-period-title strong { color: var(--text); font-size: 12px; }
  .misc-export-period-title > span { color: var(--text2); font-size: 10px; }
  .misc-export-period-group > summary > .misc-export-current { grid-column: 2; grid-row: 1; margin-right: 20px; }
  .misc-export-period-content { border-top: 1px solid rgba(123,137,180,.11); }
  .misc-export-row {
    display: grid;
    grid-template-columns: 145px minmax(120px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 11px;
    background: rgba(21,26,39,.42);
  }
  .misc-export-row.is-current { box-shadow: inset 3px 0 0 #61d78b; }
  .misc-export-row.is-archived { border-top: 1px solid rgba(123,137,180,.1); background: rgba(14,18,27,.42); }
  .misc-export-kind { display: grid; gap: 2px; }
  .misc-export-kind span { color: var(--text); font-size: 12px; font-weight: 800; }
  .misc-export-kind b { color: var(--text2); font-size: 10px; }
  .misc-export-kind.tabel span { color: #aebaff; }
  .misc-export-kind.agreement span { color: #ffd978; }
  .misc-export-period { display: grid; gap: 3px; min-width: 0; }
  .misc-export-period strong { color: var(--text); font-size: 12px; }
  .misc-export-period span { overflow: hidden; color: var(--text2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .misc-export-current,
  .misc-export-old { padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
  .misc-export-current { background: rgba(67,233,123,.11); color: #8ce7ad; }
  .misc-export-old { background: rgba(148,163,184,.09); color: var(--text2); }
  .misc-export-version { display: flex; align-items: center; gap: 8px; }
  .misc-export-version b { color: var(--text); font-size: 12px; }
  .misc-export-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
  .misc-export-archive-title { padding: 8px 11px 5px; border-top: 1px solid rgba(123,137,180,.1); color: var(--text2); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
  .misc-password-form {
    display: flex;
    max-width: 520px;
    align-items: flex-start;
    gap: 10px;
  }
  .misc-password-form .form-group { flex: 1; margin: 0; }
  .ui-empty {
    padding: 20px;
    text-align: center;
    color: var(--text2);
    border: 1px dashed rgba(123,137,180,0.24);
    border-radius: 12px;
    background: rgba(15,19,29,0.45);
  }
  .ui-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(123,137,180,0.2);
    background: rgba(15,19,29,0.62);
    color: var(--text2);
    font-size: 12px;
    font-weight: 750;
  }

  /* ── МОДАЛКИ ── */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
  }
  .modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 28px; width: 100%; max-width: 480px;
    box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto;
    --modal-pad: 28px;
  }
  .modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
  .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

  /* ── ФОРМЫ ── */
  .form-group { margin-bottom: 14px; }
  .form-label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
  .form-input, .form-select {
    width: 100%; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: 9px 12px; font-size: 14px;
    outline: none; transition: border-color 0.15s;
  }
  .form-input:focus, .form-select:focus { border-color: var(--accent); }
  .form-select option { background: var(--surface); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
  .form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

  /* Иконки календаря и часов в date/time инпутах */
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
  }
  input[type="date"]::-webkit-calendar-picker-indicator:hover,
  input[type="time"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(1) opacity(1);
  }

  /* ── ВКЛАДКИ АДМИНКИ ── */
  .tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--surface); padding: 4px; border-radius: 10px; border: 1px solid var(--border); width: fit-content; }
  .tab { padding: 8px 18px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text2); transition: all 0.15s; }
  .tab.active { background: var(--accent); color: #fff; }
  .tab:hover:not(.active) { background: var(--surface2); color: var(--text); }

  /* ── ТАБЛИЦЫ ── */
  .table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
  table { width: 100%; border-collapse: collapse; }
  th { background: var(--surface2); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2); }
  td { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; }
  tr:hover td { background: var(--surface2); }

  /* ── АНАЛИТИКА ── */
  .analytics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
  .analytics-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
  .analytics-name { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
  .analytics-hours { font-size: 28px; font-weight: 700; }
  .workload-table { width: 100%; border-collapse: collapse; }
  .workload-table th, .workload-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  .workload-table thead th { color: var(--text2); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; user-select: none; }
  .workload-table thead th:hover { color: var(--text1); }
  .delta-up { color: #27ae60; font-weight: 500; }
  .delta-down { color: #e74c3c; font-weight: 500; }
  .delta-neutral { color: var(--text2); }
  .shows-workspace { --show-panel: rgba(21,25,35,0.82); --show-panel-strong: rgba(30,36,50,0.88); }
  .shows-layout { display: grid; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .shows-sidebar {
    min-width: 0;
    background: linear-gradient(180deg, rgba(24,29,40,0.94), rgba(15,19,28,0.72));
    border: 1px solid rgba(123,137,180,0.24);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.035);
  }
  .shows-sidebar-title {
    color: #dce2f4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 2px 4px 12px;
  }
  .show-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 13px 14px 13px 18px;
    margin-bottom: 9px;
    border-radius: 10px;
    background: rgba(13,17,26,0.66);
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
    border: 1px solid rgba(123,137,180,0.2);
    overflow: hidden;
  }
  .show-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--card-color, #3498db);
    opacity: 0.9;
  }
  .show-card:hover {
    transform: translateY(-1px);
    background: rgba(27,34,50,0.82);
    border-color: rgba(123,137,180,0.34);
  }
  .show-card.active {
    background: linear-gradient(135deg, rgba(52,152,219,0.22), rgba(21,25,35,0.92));
    border-color: rgba(99,125,255,0.58);
    box-shadow: 0 14px 38px rgba(52,101,246,0.14), inset 0 0 0 1px rgba(255,255,255,0.025);
  }
  .show-card-title { font-weight: 800; font-size: 14px; line-height: 1.18; letter-spacing: 0; }
  .show-card-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    margin-top: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  }
  .show-sidebar-actions { display: grid; gap: 6px; margin-top: 14px; }
  .show-sidebar-btn {
    width: 100% !important;
    min-height: 34px;
    justify-content: flex-start;
    font-size: 13px !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
  }
  .show-day-toggle { margin-top: 8px !important; }
  .tg-hint,
  .show-action-hint {
    color: #8e98bd;
    font-size: 11px;
    margin-top: 7px;
    padding: 0 4px;
    line-height: 1.45;
  }
  .show-comments-action { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(123,137,180,0.16); }
  .show-detail {
    min-width: 0;
    background: rgba(15,19,28,0.52);
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 14px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .show-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: -2px 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(123,137,180,0.16);
  }
  .show-detail-header h2 { font-size: 22px; font-weight: 850; margin: 0; letter-spacing: 0; }
  .show-detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
  .btn-danger-soft { color: #ff7a82 !important; }
  .show-description { color: var(--text2); font-size: 13px; line-height: 1.55; margin: -4px 0 16px; }
  .show-subtabs {
    display: inline-flex;
    gap: 4px;
    border: 1px solid rgba(123,137,180,0.22);
    background: rgba(13,17,26,0.62);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 18px;
  }
  .show-subtab {
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text2);
    border: 0;
    border-radius: 8px;
    margin-bottom: 0;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease;
    font-weight: 750;
    letter-spacing: 0;
  }
  .show-subtab.active {
    color: #fff;
    background: linear-gradient(135deg, #5f79ff, #4563e9);
    box-shadow: 0 10px 24px rgba(69,99,233,0.22);
  }
  .show-subtab:hover { color: var(--text1); background: rgba(123,137,180,0.11); }
  .show-subtab.active:hover { background: linear-gradient(135deg, #6b82ff, #506cf0); }
  .show-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
  .show-analysis-filter label { font-size: 13px; color: var(--text2); font-weight: 750; }
  .show-analysis-filter select { width: 96px; font-size: 13px; }
  .topics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 10px;
    background: rgba(10,14,22,0.36);
  }
  .topics-table td, .topics-table th { padding: 9px 12px; border-bottom: 1px solid rgba(123,137,180,0.15); }
  .topics-table tr:last-child td { border-bottom: 0; }
  .topics-table thead th {
    color: #9fa9cc;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    letter-spacing: 0.06em;
    background: rgba(34,41,58,0.88);
  }
  .topics-table tbody tr:hover td { background: rgba(48,58,83,0.26); }
  .tg-badge { color: #fff; padding: 2px 7px; border-radius: 10px; font-size: 12px; font-weight: 500; background: #2980b9; }
  .topic-cat-select { font-size:12px; padding:2px 4px; background:transparent; border:1px solid var(--border); border-radius:4px; color:var(--text1); max-width:120px; }
  .topic-cat-select option { background:var(--bg1); color:var(--text1); }
  .topic-rating { display:flex; gap:2px; }
  .rating-btn { background:none; border:none; cursor:pointer; font-size:14px; opacity:0.3; padding:2px; transition:opacity .15s; }
  .rating-btn:hover, .rating-btn.active { opacity:1; }
  .topic-quality-dot { font-size:10px; margin-left:4px; }
  .analysis-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 18px;
  }
  .legend-item {
    margin-bottom: 0;
    background: rgba(21,25,35,0.86);
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 12px;
    padding: 14px 16px;
  }
  .legend-item:last-child { margin-bottom:0; }
  .analysis-howto { margin-bottom:20px; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
  .howto-header { display:flex; justify-content:space-between; padding:10px 14px; cursor:pointer; color:var(--text2); font-size:13px; font-weight:500; }
  .howto-header:hover { background:var(--bg2); }
  .howto-body { padding:16px; border-top:1px solid var(--border); }
  .howto-item { margin-bottom:20px; padding-bottom:20px; border-bottom:1px solid var(--border); }
  .howto-item:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
  .howto-item b { display:block; font-size:13px; font-weight:600; margin-bottom:8px; color:var(--accent, #7eb8f7); }
  .howto-item p { color:#888; font-size:13px; line-height:1.7; margin:0 0 6px; }
  .howto-item ul, .howto-item ol { color:#888; font-size:13px; line-height:1.7; margin:6px 0 6px 0; padding-left:0; list-style:none; }
  .howto-item ul li, .howto-item ol li { padding:3px 0 3px 20px; position:relative; }
  .howto-item ul li::before { content:'–'; position:absolute; left:4px; color:#555; }
  .howto-item ol { counter-reset:howto-counter; }
  .howto-item ol li { counter-increment:howto-counter; }
  .howto-item ol li::before { content:counter(howto-counter) '.'; position:absolute; left:0; color:#7eb8f7; font-weight:600; }
  .howto-item .howto-sub { font-size:12px; font-weight:600; color:#ccc; margin:10px 0 4px; text-transform:uppercase; letter-spacing:0.05em; }
  .howto-item .howto-faq { background:var(--bg2, #1a1a1a); border-radius:6px; padding:10px 14px; margin-top:10px; }
  .howto-item .howto-faq-q { font-size:12px; font-weight:600; color:#ccc; margin-bottom:4px; }
  .howto-item .howto-faq-a { font-size:12px; color:#666; line-height:1.6; }
  .legend-item b { color:#7eb8f7; font-size:14px; }
  .legend-item p { color:var(--text2); font-size:13px; margin:4px 0 0; line-height:1.4; }
  .analyze-warning { background:#2a1a00; border:1px solid #5a3a00; border-radius:6px; padding:10px 14px; margin:10px 0; font-size:12px; color:#f39c12; line-height:1.6; }
  .analyze-warning a { color:#7eb8f7; cursor:pointer; text-decoration:underline; }
  .ca-block { font-size:13px; margin-bottom:8px; }
  .subtopic-tag { display:inline-block; background:var(--bg2); border:1px solid var(--border); border-radius:12px; padding:2px 8px; margin:2px 3px; font-size:11px; }
  .best-comment { font-size:13px; margin-bottom:8px; background:var(--bg2); border-left:3px solid var(--accent); padding:8px 12px; border-radius:4px; line-height:1.5; }
  .ca-warning { font-size:12px; color:#e74c3c; background:#2a0a0a; border:1px solid #5a1a1a; border-radius:6px; padding:8px 12px; margin:8px 0; }
  .ca-summary { font-size:13px; background:var(--bg2); padding:10px; border-radius:6px; margin-top:8px; line-height:1.5; }
  .ca-note { font-size:12px; color:#e67e22; background:#2a1a00; border:1px solid #5a3a00; border-radius:4px; padding:6px 10px; }
  .duplicate-group { margin-bottom:12px; }
  .duplicate-group b { font-size:13px; }
  .dup-topic { display:flex; gap:8px; padding:3px 0; font-size:13px; align-items:baseline; }
  .dup-date { color:#7eb8f7; font-size:12px; width:40px; flex-shrink:0; }
  .dup-text { flex:1; }
  .dup-tg { color:#f39c12; font-size:11px; margin-left:auto; white-space:nowrap; }
  .dup-arrow { color:#555; font-size:11px; padding:2px 0 2px 40px; }
  .sync-result-row { display:flex; justify-content:space-between; padding:3px 0; font-size:13px; }
  .sync-show { font-weight:500; }
  .sync-skipped { color:#888; }
  .sync-updated { color:#27ae60; font-weight:500; }
  .sync-unmatched-header { font-size:12px; font-weight:600; margin-bottom:6px; color:var(--text2); }
  .sync-unmatched-hint { color:#666; font-size:11px; font-weight:400; margin-left:8px; }
  .analyze-stats-footer { display:flex; gap:16px; flex-wrap:wrap; padding:12px 0; border-top:1px solid var(--border); margin-top:12px; color:var(--text2); font-size:12px; }
  .analyze-stats-footer b { color:var(--text1); }
  .analysis-meta { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
  .model-badge { font-size:12px; padding:3px 10px; border-radius:10px; font-weight:500; }
  .badge-sonnet { background:#1a2a4a; color:#7eb8f7; }
  .badge-haiku { background:#1a3a1a; color:#7ae87a; }
  .badge-gpt { background:#1a3a1a; color:#5cb85c; font-size:12px; padding:3px 10px; border-radius:10px; font-weight:500; }
  .model-badge-sm { font-size:11px; color:#888; }
  .hybrid-header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
  .hybrid-label { color:#888; font-size:12px; }
  .works-block { padding:8px 0; border-bottom:1px solid #1a1a1a; }
  .works-block b { color:#7eb8f7; font-size:13px; }
  .works-block p { color:#888; font-size:12px; margin:4px 0; }
  .works-block small { color:#555; font-size:11px; }
  .no-season { color:#888; font-size:13px; background:#1a1a1a; padding:8px 12px; border-radius:6px; }
  .producer-verdict { background:#0d1a0d; border:1px solid #1a3a1a; border-radius:8px; padding:14px; margin-top:16px; }
  .producer-verdict b { color:#5cb85c; }
  .verdict-cols { display:flex; gap:20px; margin-top:10px; }
  .verdict-cols > div { flex:1; }
  .verdict-cols li { font-size:12px; color:#888; margin:3px 0; }
  .signals-grid { display:flex; gap:20px; margin-top:8px; }
  .signals-grid > div { flex:1; }
  .signals-grid li { font-size:12px; color:#888; margin:3px 0; }
  .partial-warning { background:#2a0a0a; border:1px solid #5a1a1a; border-radius:6px; padding:10px 14px; margin:8px 0; color:#e87a7a; font-size:12px; }
  .analyze-period { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:12px; }
  .analyze-period-row { display:flex; align-items:center; gap:8px; }
  .analyze-period-row label { color:#888; font-size:13px; white-space:nowrap; }
  .new-topic-row { display:flex; align-items:baseline; gap:8px; padding:4px 0; border-bottom:1px solid #1a1a1a; }
  .new-topic-num { color:#555; font-size:13px; flex-shrink:0; width:20px; }
  .new-topic-text { flex:1; font-size:13px; color:#ccc; line-height:1.5; }
  .btn-add-topic { flex-shrink:0; background:none; border:1px solid #2a2a2a; border-radius:4px; color:#7eb8f7; font-size:11px; padding:2px 8px; cursor:pointer; white-space:nowrap; }
  .btn-add-topic:hover { background:#1a2a3a; border-color:#7eb8f7; }
  .analyze-count-info { color:#888; font-size:13px; margin:8px 0; }
  .analyze-conflicts { background:#1a1500; border:1px solid #3a3000; border-radius:6px; padding:10px 14px; margin-top:8px; }
  .conflict-month-row { padding:3px 0; font-size:12px; color:#ccc; }
  .conflict-month-row a { color:#7eb8f7; cursor:pointer; margin-left:8px; text-decoration:underline; }
  .analyze-info { background:#1a2a1a; border:1px solid #2a4a2a; border-radius:6px; padding:10px 14px; margin:10px 0; font-size:12px; color:#7ae87a; }
  .analyze-info a { color:#7eb8f7; cursor:pointer; text-decoration:underline; margin:0 6px; }
  .btn-export-docx { background:none; border:none; cursor:pointer; color:#666; font-size:14px; padding:2px 4px; }
  .btn-export-docx:hover { color:#7eb8f7; }
  .btn-delete-analysis { background:none; border:none; cursor:pointer; color:#666; font-size:14px; padding:2px 4px; }
  .btn-delete-analysis:hover { color:#e74c3c; }
  .api-usage-stats { font-size:13px; }
  .usage-total { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border); margin-bottom:8px; }
  .usage-value { font-size:20px; font-weight:700; color:#27ae60; }
  .usage-row { display:flex; justify-content:space-between; padding:4px 0; color:#888; }
  .usage-month { display:flex; justify-content:space-between; padding:4px 0; color:#666; font-size:12px; }
  .audience-block { margin-top:20px; }
  .audience-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
  .audience-header h4 { color:#aaa; font-size:13px; font-weight:600; margin:0; }
  .audience-summary { display:flex; gap:16px; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--border); margin-bottom:12px; font-size:13px; color:#888; }
  .audience-summary b { color:#ccc; }
  .audience-item { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #1a1a1a; }
  .audience-type { font-size:16px; width:20px; flex-shrink:0; }
  .audience-name { flex:1; font-size:13px; font-weight:500; }
  .audience-username { color:#888; font-weight:400; font-size:11px; margin-left:4px; }
  .audience-meta { display:flex; gap:8px; flex-wrap:wrap; }
  .aud-stat { font-size:11px; color:#666; background:#1a1a1a; padding:2px 6px; border-radius:10px; }
  .stat-good { color:#27ae60; background:#0a1f0a; }
  .stat-neutral { color:#888; }
  .audience-empty { color:#555; font-size:13px; padding:16px 0; text-align:center; }
  .analysis-mode-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 11px;
    background: rgba(13,17,26,0.56);
  }
  .analysis-mode-tabs .btn { font-size: 13px; padding: 7px 14px; }
  .show-analysis-actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
  .show-analysis-actions .btn { font-size:13px; }
  .show-comment-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    align-items: stretch;
  }
  .show-comment-steps > div {
    background: rgba(21,25,35,0.72);
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 12px;
    padding: 12px;
  }
  .show-comment-steps .btn { font-size:13px; }
  .analysis-history {
    margin-top: 20px;
    background: rgba(10,14,22,0.28);
    border: 1px solid rgba(123,137,180,0.15);
    border-radius: 12px;
    padding: 12px;
  }
  .analysis-history h4 { color:#dce2f4; font-size:13px; font-weight:800; margin:0 0 10px; letter-spacing:0; }
  .history-item {
    display:flex;
    gap:16px;
    align-items:center;
    padding:9px 11px;
    border-radius:9px;
    cursor:pointer;
    color:var(--text2);
    font-size:13px;
    border: 1px solid transparent;
  }
  .history-item:hover { background:rgba(48,58,83,0.24); color:var(--text1); border-color:rgba(123,137,180,0.16); }
  .history-open { margin-left:auto; color:#7eb8f7; }
  .topics-accordion-group { margin-bottom: 8px; }
  .topics-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    background: rgba(21,25,35,0.84);
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    user-select: none;
    transition: background .16s ease, border-color .16s ease;
  }
  .topics-accordion-header:hover { background: rgba(30,36,50,0.9); border-color: rgba(123,137,180,0.32); }
  .topics-accordion-count { color: var(--text2); font-size: 12px; font-weight: 400; margin-left: auto; margin-right: 12px; }
  .toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 48px));
    pointer-events: none;
  }
  .toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 12px 14px 12px 16px;
    border: 1px solid rgba(123,137,180,.28);
    border-radius: 10px;
    background: rgba(24, 29, 42, .96);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    box-shadow: 0 14px 36px rgba(0,0,0,.42);
    animation: fadeInUp .22s ease;
    pointer-events: auto;
  }
  .toast-success { border-color: rgba(67,233,123,.45); box-shadow: 0 14px 36px rgba(0,0,0,.42), inset 3px 0 0 rgba(67,233,123,.9); }
  .toast-warning { border-color: rgba(255,215,64,.48); box-shadow: 0 14px 36px rgba(0,0,0,.42), inset 3px 0 0 rgba(255,215,64,.92); }
  .toast-error { border-color: rgba(255,95,109,.48); box-shadow: 0 14px 36px rgba(0,0,0,.42), inset 3px 0 0 rgba(255,95,109,.92); }
  .toast-info { border-color: rgba(79,110,247,.5); box-shadow: 0 14px 36px rgba(0,0,0,.42), inset 3px 0 0 rgba(79,110,247,.92); }
  .toast-close {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
  }
  .toast-close:hover { color: var(--text); background: rgba(255,255,255,.07); }
  @keyframes fadeInUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
  @media (max-width: 768px) {
    .shows-layout { grid-template-columns: 1fr; gap: 14px; }
    .shows-sidebar { width: 100%; }
    .analysis-legend,
    .show-comment-steps { grid-template-columns: 1fr; }
  }
  .week-bars { display: flex; align-items: flex-end; gap: 3px; height: 36px; justify-content: center; }
  .week-bar { width: 10px; background: #3498db; border-radius: 2px 2px 0 0; min-height: 2px; transition: opacity .2s; cursor: default; }
  .week-bar:hover { opacity: 0.7; }
  .analytics-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

  /* ── BADGE ── */
  .badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
  .badge-green { background: rgba(67,233,123,0.15); color: var(--green); }
  .badge-red { background: rgba(255,95,109,0.15); color: var(--red); }
  .badge-yellow { background: rgba(255,215,64,0.15); color: var(--yellow); }

  /* ── ЛОАДЕР ── */
  .loader { display: flex; align-items: center; justify-content: center; padding: 60px; }
  .spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── ЦВЕТНОЙ ИНДИКАТОР ── */
  .color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

  /* ── ЛОГИН ── */
  .login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
  .login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 36px; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
  .login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
  .login-sub { color: var(--text2); font-size: 14px; margin-bottom: 24px; }
  .error-msg { background: rgba(255,95,109,0.15); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }

  /* ── VACATION BADGE ── */
  .on-vacation { font-size: 11px; color: var(--yellow); margin-top: 2px; }

  /* ── DATE RANGE ── */
  .date-range { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
  .export-btn { margin-left: auto; }

  /* ── TOGGLE (видимость недели) ── */
  .toggle-wrap { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
  .toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
  .toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
  .toggle-slider {
    position: absolute; inset: 0; border-radius: 20px;
    background: var(--border); transition: background 0.2s;
  }
  .toggle-slider::before {
    content: ''; position: absolute;
    width: 14px; height: 14px; border-radius: 50%;
    left: 3px; top: 3px;
    background: var(--text2); transition: all 0.2s;
  }
  .toggle input:checked + .toggle-slider { background: var(--green); }
  .toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: #fff; }

  /* ── ON AIR ── */
  .onair-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ff4444;
    text-transform: uppercase;
  }
  .onair-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff4444;
    flex-shrink: 0;
    animation: pulse-dot 1.2s ease-in-out infinite;
  }
  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.6); }
  }
  .pulse-badge { animation: pulse-badge-anim 1.5s ease-in-out infinite; }
  @keyframes pulse-badge-anim { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
  .tooltip-wrap { position: relative; display: inline-block; }
  .tooltip-wrap .tooltip-text { visibility: hidden; opacity: 0; width: 280px; background: #1e293b; color: #e2e8f0; font-size: 12px; line-height: 1.5; border-radius: 6px; padding: 8px 12px; position: absolute; z-index: 9999; bottom: 125%; left: 50%; transform: translateX(-50%); transition: opacity 0.2s; border: 1px solid #334155; pointer-events: none; }
  .tooltip-wrap:hover .tooltip-text { visibility: visible; opacity: 1; }
  .help-icon { display: inline-block; width: 16px; height: 16px; background: #475569; color: white; border-radius: 50%; font-size: 10px; line-height: 16px; text-align: center; cursor: help; margin-left: 4px; flex-shrink: 0; }
  .info-banner { display: flex; gap: 10px; align-items: flex-start; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #94a3b8; line-height: 1.5; }
  .policy-select { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
  .policy-select option { background: #1e293b; color: #e2e8f0; }
  .policy-select-manual { border-color: var(--accent); background: rgba(0,120,255,0.06); }
  .upload-policy-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; padding: 6px 10px; background: #1e293b; border-radius: 4px; border-left: 3px solid #334155; line-height: 1.5; }
  .edit-week-grid { display: grid; grid-template-columns: repeat(7, minmax(142px, 1fr)); gap: 6px; min-width: 1030px; }
  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .dashboard-today {
    padding: 16px;
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-lg);
    background: linear-gradient(135deg, rgba(91,116,246,.13), rgba(21,25,35,.96) 42%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  }
  .dashboard-today-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
  }
  .dashboard-today-head .dashboard-card-kicker { margin-bottom: 2px; }
  .dashboard-today-head strong { color: var(--text1); font-size: 15px; }
  .dashboard-today-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-today-item {
    min-width: 0;
    min-height: 82px;
    padding: 11px 12px;
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-md);
    background: rgba(11,14,22,.48);
  }
  .dashboard-today-item > span {
    display: block;
    margin-bottom: 6px;
    color: var(--text2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .dashboard-today-item strong {
    display: block;
    overflow: hidden;
    color: var(--text1);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-today-item small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--text2);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-today-item.is-live { box-shadow: inset 3px 0 0 var(--green); }
  .dashboard-today-item.needs-attention { box-shadow: inset 3px 0 0 var(--red); }
  .dashboard-card {
    min-width: 0;
    padding: 18px;
    background: linear-gradient(180deg, rgba(27,32,45,0.96), rgba(18,23,34,0.96));
    border: 1px solid rgba(123,137,180,0.22);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .dashboard-card-primary {
    border-color: rgba(91,116,255,0.42);
    box-shadow: inset 3px 0 0 rgba(91,116,255,0.72), inset 0 1px 0 rgba(255,255,255,0.035);
  }
  .dashboard-card-wide { grid-column: 1 / -1; }
  .dashboard-card-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .dashboard-card-kicker span {
    padding: 2px 7px;
    color: rgba(194,202,226,.8);
    background: rgba(123,137,180,.1);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .03em;
  }
  .dashboard-card-value {
    margin-bottom: 9px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
  }
  .dashboard-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .dashboard-card-cta { margin-left: auto; }
  .dashboard-week-status { font-size: 13px; font-weight: 650; }
  .dashboard-list-item,
  .dashboard-list-row {
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.45;
  }
  .dashboard-list-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    background: none;
    border: 0;
    text-align: left;
  }
  .dashboard-clickable-row,
  .dashboard-attention-row { cursor: pointer; }
  .dashboard-clickable-row:hover,
  .dashboard-attention-row:hover { color: #fff; }
  .dashboard-muted { color: var(--text2); }
  .dashboard-ok { color: var(--green); font-size: 14px; font-weight: 700; }
  .dashboard-danger { color: var(--red); font-size: 13px; }
  .dashboard-subtext { color: var(--text2); font-size: 12px; font-weight: 450; }
  .dashboard-note { color: var(--text2); font-size: 12px; }
  .dashboard-row-title { color: var(--text); font-size: 14px; font-weight: 700; }
  .dashboard-attention-card {
    padding: 16px 18px;
    border-color: rgba(243,156,18,.3);
    background: linear-gradient(135deg, rgba(243,156,18,.07), rgba(18,23,34,.96) 48%);
  }
  .dashboard-attention-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 9px 0;
    color: var(--text);
    background: none;
    border: 0;
    border-top: 1px solid rgba(123,137,180,.16);
    text-align: left;
  }
  .dashboard-issue {
    padding: 3px 9px;
    color: #aab7ff;
    background: rgba(79,110,247,.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }
  .dashboard-issue.is-empty { color: #ff9a93; background: rgba(231,76,60,.16); }
  .dashboard-issue.is-unpub { color: #ffcf7a; background: rgba(243,156,18,.16); }
  .dashboard-change-row {
    display: grid;
    grid-template-columns: 72px minmax(90px, auto) 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 7px 0;
    border-top: 1px solid rgba(123,137,180,.14);
    font-size: 13px;
  }
  .air-subtabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .settings-layout { display: flex; gap: 20px; }
  .settings-sidebar { width: 180px; flex-shrink: 0; }
  .settings-content { flex: 1; min-width: 0; }
  [v-cloak] { display: none !important; }

  /* ══════════════════════════════════════════════════════════
     МОБИЛЬНАЯ АДАПТАЦИЯ АДМИНКИ (≤768px)
     ══════════════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    .dashboard-today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* ── ШАПКА ── */
    .header { padding: 0 12px; height: 52px; gap: 8px; }
    .header-logo { min-width: 0; max-width: none; font-size: 13px; white-space: nowrap; }
    .header-logo-full { display: none; }
    .header-logo-short { display: inline; }
    .header-nav { gap: 4px; }
    .header-nav .btn { padding: 5px 10px; font-size: 12px; }
    .header-user { display: none; }

    /* ── ОСНОВНОЙ КОНТЕНТ ── */
    .main { padding: 16px 10px; }

    /* ── НАВИГАЦИЯ АДМИНКИ ── */
    .admin-nav {
      gap: 6px;
      margin-bottom: 20px;
      padding: 5px;
      border-radius: 11px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .admin-nav::-webkit-scrollbar { display: none; }
    .admin-nav-group { padding-top: 17px; }
    .admin-nav .tab { min-height: 33px; padding: 6px 10px; font-size: 12px; }
    .admin-nav-host-link { padding-inline: 10px; font-size: 11px; }
    .tabs {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      width: 100%; scrollbar-width: none;
      flex-wrap: nowrap; white-space: nowrap;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { padding: 7px 12px; font-size: 13px; flex-shrink: 0; }

    /* ── ДАШБОРД ── */
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .dashboard-card-wide { grid-column: auto; }
    .dashboard-change-row { grid-template-columns: 64px 1fr; }
    .dashboard-change-row > :last-child { grid-column: 1 / -1; }
    .misc-grid { grid-template-columns: 1fr; }
    .misc-password-card { grid-column: auto; }
    .misc-export-history-card { grid-column: auto; }
    .misc-export-history-head { align-items: flex-start; flex-wrap: wrap; }
    .misc-export-history-head > .btn { margin-left: 47px; }
    .misc-export-sections { grid-template-columns: 1fr; }
    .misc-export-period-group > summary { grid-template-columns: minmax(0, 1fr) 16px; }
    .misc-export-period-group > summary > .misc-export-current { display: none; }
    .misc-export-row { grid-template-columns: 1fr; gap: 8px; }
    .misc-export-actions { justify-content: stretch; }
    .misc-export-actions .btn { flex: 1; justify-content: center; }
    .misc-password-form { display: block; }
    .misc-password-form .btn { width: 100%; }

    /* ── ТАБЛИЦЫ ── */
    th, td { padding: 8px 10px; font-size: 13px; }
    th { font-size: 11px; }
    .table-wrap { margin: 0 -10px; border-radius: 0; border-left: none; border-right: none; }

    /* ── МОДАЛКИ ── */
    .modal-overlay { padding: 8px; }
    .modal { padding: 20px 16px; max-width: 100% !important; border-radius: 12px; }
    .modal-title { font-size: 16px; margin-bottom: 16px; }
    .modal-actions { flex-wrap: wrap; }

    /* ── ФОРМЫ ── */
    .form-row { grid-template-columns: 1fr !important; }
    .form-input, .form-select { font-size: 16px; padding: 10px 12px; }

    /* ── КНОПКИ ── */
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-sm { padding: 6px 10px; font-size: 12px; }

    /* ── МОДАЛКА РЕДАКТИРОВАНИЯ РАСПИСАНИЯ (7 дней) ── */
    .edit-week-grid {
      grid-template-columns: 1fr !important;
      min-width: 0 !important;
    }

    /* ── ШОУ ── */
    .shows-layout { grid-template-columns: 1fr; gap: 14px; }
    .shows-sidebar { width: 100%; }
    .show-subtabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
    .show-subtab { flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
    .analysis-legend,
    .show-comment-steps { grid-template-columns: 1fr; }

    /* ── АНАЛИТИКА ── */
    .analytics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .analytics-card { padding: 12px; }
    .analytics-hours { font-size: 22px; }
    .workload-table th, .workload-table td { padding: 6px 8px; font-size: 12px; }

    /* ── ЭФИР: под-вкладки ── */
    .air-subtabs {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      flex-wrap: nowrap; scrollbar-width: none;
      white-space: nowrap;
    }
    .air-subtabs::-webkit-scrollbar { display: none; }

    /* ── ГОСТИ: карточки ── */
    div[style*="grid-template-columns:repeat(auto"] {
      grid-template-columns: 1fr 1fr !important;
    }

    /* ── ТОСТ ── */
    .toast-stack { left: 12px; right: 12px; bottom: 12px; width: auto; }
    .toast { text-align: left; }

    /* ── БЕЙДЖИ ── */
    .badge { font-size: 11px; padding: 2px 6px; }

    /* ── НАСТРОЙКИ: layout ── */
    .settings-layout { flex-direction: column; gap: 12px; }
    .settings-sidebar {
      width: 100%; display: flex; gap: 4px;
      overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .settings-sidebar > div { flex-shrink: 0; }

    /* ── AUDIENCE METRICS ── */
    .show-audience-block .audience-metric { padding: 8px 12px; min-width: 80px; }
    .show-audience-block .metric-value { font-size: 16px; }

    /* ── ТИПЫ ДНЕЙ: таблица ── */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0; }

    /* ── КАРТОЧКА ВЕДУЩЕГО: модалка ── */
    .modal-host-card {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      border-radius: 12px 12px 0 0 !important;
      max-height: 95vh !important;
    }

    /* ── ТАБЛИЦА СМЕН В КАРТОЧКЕ ── */
    .modal-host-card .table-wrap {
      overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .modal-host-card .table-wrap td,
    .modal-host-card .table-wrap th {
      font-size: 13px; padding: 4px 6px;
    }

    /* ── РЕДАКТОР НЕДЕЛИ: разделители дней ── */
    .edit-week-day { margin-top: 20px; border-top: 2px solid rgba(255,255,255,0.15); padding-top: 12px; }
    .edit-week-day:first-child { margin-top: 0; border-top: none; padding-top: 0; }

    /* ── ТАБЛИЦА ТЕМ ШОУ ── */
    .topics-table { font-size: 13px; }
    .topics-table td, .topics-table th { padding: 6px 8px; }

    /* ── РАЗДЕЛ НЕДЕЛИ: даты и кнопки ── */
    .table-wrap td:first-child { white-space: nowrap; font-size: 13px; }
    .table-wrap td:last-child { white-space: nowrap; }
  }

  /* Дополнительные правки для маленьких экранов (≤480px) */
  @media (max-width: 480px) {
    .header-logo { font-size: 12px; }
    .tab { padding: 6px 10px; font-size: 12px; }
    .analytics-grid { grid-template-columns: 1fr; }
    div[style*="grid-template-columns:repeat(auto"] {
      grid-template-columns: 1fr !important;
    }
  }
  .guests-year-header { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:var(--surface); border-radius:6px; cursor:pointer; font-weight:500; margin:4px 0; user-select:none; }
  .guests-year-header:hover { background:var(--surface2); }
  .guests-year-count { color:var(--text2); font-size:12px; font-weight:400; margin-left:auto; margin-right:12px; }
  .show-audience-block .audience-metric { display:flex; flex-direction:column; align-items:center; background:var(--surface); padding:12px 20px; border-radius:8px; min-width:100px; border:1px solid var(--border); }
  .show-audience-block .metric-value { font-size:20px; font-weight:700; color:var(--text1); }
  .show-audience-block .metric-label { font-size:11px; color:var(--text2); margin-top:4px; }

  /* ══════════════════════════════════════════════════════════
     DESIGN REFRESH v4.95
     Нейтральный тёмный слой для production-admin без изменения логики.
     ══════════════════════════════════════════════════════════ */
  body {
    background:
      radial-gradient(circle at 18% -10%, rgba(91,116,246,0.12), transparent 32rem),
      linear-gradient(180deg, #0c0f16 0%, var(--bg) 34rem);
    color: var(--text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0;
  }
  html {
    background: var(--bg);
  }

  .header {
    height: 64px;
    padding: 0 28px;
    background: rgba(18, 22, 32, 0.92);
    border-bottom-color: rgba(123, 137, 180, 0.18);
    box-shadow: 0 1px 0 rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
  }
  .header-logo {
    font-size: 18px;
    letter-spacing: 0;
    text-transform: lowercase;
  }
  .header-nav { gap: 10px; }
  .header-user {
    color: var(--text2);
    font-size: 12px;
    padding: 0 4px;
    white-space: nowrap;
  }
  .header-user span { opacity: .58; }
  .header-logout { color: #ff7b88; }

  .main {
    max-width: 1480px;
    padding: 30px 24px 48px;
  }

  h1, h2, h3 {
    letter-spacing: 0;
  }

  a {
    color: #9fb0ff;
    text-decoration: none;
  }
  a:hover { color: #c4cdff; }

  .btn {
    min-height: 36px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: none;
  }
  .btn-primary {
    background: linear-gradient(180deg, #657cff 0%, #4e66e8 100%);
    border-color: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79,110,247,0.24);
  }
  .btn-primary:hover {
    background: linear-gradient(180deg, #7488ff 0%, #5870f3 100%);
    transform: translateY(-1px);
  }
  .btn-ghost {
    color: var(--text2);
    border-color: transparent;
  }
  .btn-ghost:hover {
    color: var(--text);
    background: rgba(154,163,192,0.1);
  }
  .btn-danger {
    background: rgba(255,102,117,0.16);
    border-color: rgba(255,102,117,0.34);
    color: #ff8d99;
  }
  .btn-danger:hover {
    background: rgba(255,102,117,0.24);
    color: #ffc3ca;
    opacity: 1;
  }
  .btn-sm {
    min-height: 30px;
    border-radius: 8px;
  }
  .btn:focus-visible,
  .tab:focus-visible,
  .form-input:focus-visible,
  .form-select:focus-visible,
  select:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  button:focus-visible {
    outline: 2px solid rgba(124,141,253,0.95);
    outline-offset: 2px;
  }

  .tabs {
    width: 100%;
    max-width: none;
    margin: 2px 0 30px;
    padding: 6px;
    gap: 3px;
    overflow-x: auto;
    background: rgba(21,25,35,0.86);
    border-color: rgba(123,137,180,0.22);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    scrollbar-width: thin;
  }
  .tab {
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 650;
    color: #a5acc8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .tab.active {
    background: linear-gradient(180deg, #637aff 0%, #4f67ec 100%);
    color: #fff;
    box-shadow: 0 7px 18px rgba(79,110,247,0.26);
  }
  .tab:hover:not(.active) {
    background: rgba(154,163,192,0.09);
    color: #eef1f8;
  }

  .admin-nav {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 2px 0 30px;
    padding: 7px;
    overflow-x: auto;
    border: 1px solid rgba(123,137,180,0.22);
    border-radius: 14px;
    background:
      radial-gradient(circle at 0 0, rgba(79,110,247,.08), transparent 34%),
      rgba(17,21,31,.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 14px 36px rgba(0,0,0,.12);
    scrollbar-width: thin;
  }
  .admin-nav-groups {
    display: flex;
    align-items: stretch;
    gap: 5px;
    min-width: max-content;
  }
  .admin-nav-group {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 18px 4px 3px;
    border-radius: 10px;
  }
  .admin-nav-group + .admin-nav-group::before {
    content: '';
    position: absolute;
    inset: 9px auto 6px -3px;
    width: 1px;
    background: rgba(123,137,180,.16);
  }
  .admin-nav-label {
    position: absolute;
    top: 2px;
    left: 10px;
    color: #6f7897;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .11em;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
  }
  .admin-nav .tab {
    min-height: 35px;
    padding: 7px 11px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13px;
  }
  .admin-nav .tab.active {
    background: linear-gradient(180deg, #637aff 0%, #4f67ec 100%);
  }
  .admin-nav-host-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: max-content;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid rgba(67,233,123,.2);
    border-radius: 10px;
    background: rgba(67,233,123,.06);
    color: #8ee6b0;
    font-size: 12px;
    font-weight: 750;
  }
  .admin-nav-host-link:hover {
    border-color: rgba(67,233,123,.4);
    background: rgba(67,233,123,.11);
    color: #bcf5d0;
  }

  .table-wrap {
    background: rgba(17,21,31,0.82);
    border-color: rgba(123,137,180,0.22);
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.18);
  }
  table {
    border-collapse: separate;
    border-spacing: 0;
  }
  th {
    background: #202637;
    color: #aeb6d3;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
  }
  td {
    padding: 11px 16px;
    border-top-color: rgba(123,137,180,0.18);
    color: #e9edf8;
  }
  tbody tr {
    transition: background-color 0.14s ease;
  }
  tr:hover td {
    background: rgba(79, 91, 126, 0.18);
  }
  td:first-child,
  th:first-child { padding-left: 18px; }

  .badge,
  .status-badge,
  .tg-badge {
    border-radius: 999px;
    font-weight: 750;
    letter-spacing: 0;
  }

  .form-input,
  .form-select,
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    background: #0d111a;
    border-color: rgba(123,137,180,0.26);
    color: var(--text);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .form-input:focus,
  .form-select:focus,
  input:focus,
  select:focus,
  textarea:focus {
    border-color: rgba(124,141,253,0.9);
    box-shadow: 0 0 0 3px rgba(91,116,246,0.16);
  }
  .form-label {
    color: #aeb6d3;
    font-weight: 650;
  }

  .rr-select {
    position: relative;
    width: 100%;
    max-width: 100%;
    font-size: 13px;
  }
  .rr-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(123,137,180,0.28);
    border-radius: 9px;
    background: rgba(8,12,20,0.82);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    text-align: left;
    transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
  }
  .rr-select-button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rr-select.open .rr-select-button,
  .rr-select-button:hover {
    border-color: rgba(124,141,253,0.58);
    background: rgba(14,19,31,0.95);
    box-shadow: 0 0 0 3px rgba(124,141,253,0.09);
  }
  .rr-select-arrow {
    flex: 0 0 auto;
    color: #9ba5c4;
    font-size: 13px;
    line-height: 1;
  }
  .rr-select-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 260;
    min-width: 100%;
    max-height: 310px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(123,137,180,0.38);
    border-radius: 12px;
    background: #121722;
    box-shadow: 0 18px 46px rgba(0,0,0,0.42);
  }
  .rr-select-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 30px;
    padding: 6px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #dfe5f5;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
  }
  .rr-select-option:hover,
  .rr-select-option.active {
    background: #202840;
    color: #fff;
  }
  .rr-select-option-muted {
    color: #9ba5c4;
  }
  .rr-status-select {
    width: 230px;
    z-index: 2;
  }
  .rr-status-select.open {
    z-index: 30;
  }
  .rr-status-select .rr-select-button,
  .rr-status-select .rr-select-option {
    color: var(--status-color, #aeb6d3);
  }
  .rr-status-select .rr-select-button {
    background: var(--status-bg, rgba(13,17,26,0.82));
    border-color: var(--status-border, rgba(123,137,180,0.28));
  }
  .rr-status-select.is-replace,
  .rr-select-option.is-replace {
    --status-color: #ff8d99;
    --status-bg: rgba(220,50,50,0.23);
    --status-border: rgba(220,50,50,0.48);
  }
  .rr-status-select.is-review,
  .rr-select-option.is-review {
    --status-color: #ffd740;
    --status-bg: rgba(255,193,7,0.18);
    --status-border: rgba(255,193,7,0.4);
  }
  .rr-status-select.is-approved,
  .rr-select-option.is-approved {
    --status-color: #8b9fff;
    --status-bg: rgba(79,110,247,0.2);
    --status-border: rgba(79,110,247,0.44);
  }
  .rr-status-select.is-ready,
  .rr-select-option.is-ready {
    --status-color: #43e97b;
    --status-bg: rgba(67,233,123,0.18);
    --status-border: rgba(67,233,123,0.42);
  }
  .rr-select-option.is-empty {
    --status-color: #aeb6d3;
    --status-bg: rgba(154,163,192,0.08);
    --status-border: rgba(123,137,180,0.22);
    color: #aeb6d3;
  }
  .rr-select-option.is-replace,
  .rr-select-option.is-review,
  .rr-select-option.is-approved,
  .rr-select-option.is-ready {
    color: var(--status-color);
  }
  .rr-show-filter-select {
    width: 118px;
  }
  .rr-show-month-select {
    width: 150px;
  }
  .rr-agreement-select {
    width: 340px;
  }
  .rr-agreement-menu {
    width: 390px;
    max-height: 390px;
  }
  .rr-select-group-title {
    padding: 8px 9px 5px;
    color: #7d88aa;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  .rr-select-month-title {
    padding: 5px 9px 3px;
    color: #ffd740;
    font-size: 12px;
    font-weight: 800;
  }
  .rr-select-month-group + .rr-select-month-group {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(123,137,180,0.14);
  }

  .modal-overlay {
    background: rgba(3,6,12,0.78);
    backdrop-filter: blur(6px);
  }
  .modal {
    background: #181d28;
    border-color: rgba(123,137,180,0.28);
    border-radius: 14px;
    box-shadow: 0 26px 90px rgba(0,0,0,0.56);
  }
  .modal:not(.modal-week-editor):not(.modal-host-card):not(.modal-guests):not(.confirm-modal) {
    background:
      radial-gradient(circle at 16% 0%, rgba(79,110,247,0.10), transparent 34%),
      linear-gradient(180deg, #1b202d, #161b27);
    border-color: rgba(123,137,180,0.30);
    border-radius: 16px;
  }
  .modal-title {
    color: #f3f5fb;
    letter-spacing: 0;
  }
  .modal:not(.modal-week-editor):not(.modal-host-card):not(.modal-guests):not(.confirm-modal) > .modal-title:first-child {
    margin: -2px 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(123,137,180,0.18);
    font-size: 20px;
    line-height: 1.2;
  }
  .modal-actions {
    background: linear-gradient(180deg, rgba(24,29,40,0.65), #181d28 42%);
    padding-top: 16px;
    padding-bottom: 2px;
  }
  .modal:not(.modal-week-editor):not(.modal-host-card):not(.modal-guests):not(.confirm-modal) > .modal-actions:last-child {
    margin: 22px calc(var(--modal-pad) * -1) calc(var(--modal-pad) * -1);
    padding: 16px var(--modal-pad) var(--modal-pad);
    border-top: 1px solid rgba(123,137,180,0.16);
    background: linear-gradient(180deg, rgba(24,29,40,0.76), rgba(20,25,36,0.96));
    position: sticky;
    bottom: calc(var(--modal-pad) * -1);
    z-index: 1;
  }
  .modal-form {
    --modal-accent: #6c7fff;
    position: relative;
    overflow-x: hidden;
  }
  .modal-form::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--modal-accent), color-mix(in srgb, var(--modal-accent), transparent 72%));
  }
  .modal-planning { --modal-accent: #6c7fff; }
  .modal-people { --modal-accent: #43c6a2; }
  .modal-access { --modal-accent: #b07bd8; }
  .modal-templates { --modal-accent: #d7a84a; }
  .modal-form-head,
  .host-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: -2px 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(123,137,180,0.18);
  }
  .modal-head-copy {
    min-width: 0;
    flex: 1 1 auto;
  }
  .modal-form-head .modal-title,
  .host-card-header .modal-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
  }
  .modal-subtitle {
    margin-top: 5px;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .modal-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex: 0 0 auto;
  }
  .modal-unsaved-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid rgba(245,196,81,0.28);
    border-radius: 999px;
    background: rgba(245,196,81,0.1);
    color: #f7d47b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .day-col,
  .analytics-card,
  .login-card,
  .show-card,
  .show-audience-block .audience-metric {
    background: rgba(21,25,35,0.9);
    border-color: rgba(123,137,180,0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .day-header {
    background: rgba(30,36,50,0.55);
    border-bottom-color: rgba(123,137,180,0.18);
  }
  .slot-host {
    background: rgba(30,36,50,0.78);
    border-color: rgba(123,137,180,0.2);
    border-left-color: var(--slot-accent, #6c7fff);
  }
  .slot-show {
    border-color: color-mix(in srgb, var(--slot-accent, #d7a84a), transparent 64%);
    border-left-color: var(--slot-accent, #d7a84a);
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--slot-accent, #d7a84a), transparent 87%), transparent 76%),
      rgba(30,36,50,0.78);
  }

  .settings-sidebar > div,
  .air-subtabs > div,
  .show-subtab {
    border-radius: 8px;
  }

  .color-dot {
    width: 11px;
    height: 11px;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
  }

  .info-banner {
    background: rgba(21,25,35,0.9);
    border-color: rgba(123,137,180,0.22);
  }

  @media (max-width: 768px) {
    .header {
      height: 56px;
      padding: 0 14px;
    }
    .main {
      padding: 18px 10px 32px;
    }
    .tabs {
      margin-bottom: 18px;
      padding: 5px;
      border-radius: 10px;
    }
    .tab {
      min-height: 34px;
      padding: 7px 12px;
    }
  }

  /* ── Рабочие экраны: карточка ведущего, недели, шаблоны, настройки ── */
  .modal-host-card {
    padding: 26px 28px 24px;
    width: 95vw;
    max-width: 980px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .host-card-header {
    align-items: center;
    margin-bottom: 16px;
  }
  .host-card-color {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }
  .host-card-filters {
    display: grid !important;
    grid-template-columns: minmax(118px, auto) 92px auto minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 10px 12px !important;
    align-items: end !important;
    margin-bottom: 12px;
    padding: 2px 0 8px;
  }
  .host-card-filter-field { margin: 0; }
  .host-card-filter-label { font-size: 11px; }
  .host-card-filter-select,
  .host-card-year-input,
  .host-card-date-input,
  .host-card-filter-submit,
  .host-card-inline-input { height: 34px; }
  .host-card-filter-select { width: auto; font-size: 13px; }
  .host-card-year-input { width: 80px; font-size: 13px; }
  .host-card-date-input { width: 100%; min-width: 0; }
  .host-card-filter-or {
    align-self: center;
    padding: 0 4px;
    color: var(--text2);
    font-size: 13px;
  }
  .host-card-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(170px, auto);
    gap: 14px !important;
    align-items: center;
    margin-bottom: 12px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(35,42,60,0.94), rgba(29,35,50,0.94)) !important;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 10px;
  }
  .host-card-summary > div {
    min-width: 0;
  }
  .host-card-tabs {
    display: inline-flex;
    gap: 4px;
    width: fit-content;
    margin-bottom: 14px;
    padding: 3px;
    background: #121722 !important;
    border: 1px solid rgba(123,137,180,0.24);
    border-color: rgba(123,137,180,0.24) !important;
    border-radius: 8px;
  }
  .host-card-tab {
    padding: 6px 14px;
    color: var(--text2);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, color .15s;
  }
  .host-card-tab:hover { color: var(--text); }
  .host-card-tab.active {
    color: #fff;
    background: var(--accent);
  }
  .host-card-stat-label { color: var(--text2); font-size: 12px; }
  .host-card-stat-value { margin-top: 2px; font-size: 22px; font-weight: 800; }
  .host-card-stat-value.is-total { font-size: 28px; }
  .host-card-stat-value.is-day { color: #ffd740; }
  .host-card-stat-value.is-night { color: #7c8dfd; }
  .host-card-limit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
  .host-card-limit-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
  }
  .host-card-limit-badge.is-danger { color: #ff7d87; background: rgba(255,95,109,.15); }
  .host-card-limit-badge.is-warning { color: #ffd740; background: rgba(255,215,64,.12); }
  .host-card-table { margin-bottom: 16px; }
  .host-card-table tr.has-penalty { background: rgba(231,76,60,.08); }
  .host-card-date-cell { font-weight: 700; }
  .host-card-time-cell { font-variant-numeric: tabular-nums; }
  .host-card-compact-cell { font-size: 13px; }
  .host-card-muted-cell { color: var(--text2); }
  .host-card-penalty-input {
    width: 80px;
    height: 30px;
    font-size: 13px;
    text-align: center;
  }
  .host-card-note-input { height: 30px; font-size: 12px; }
  .host-card-empty {
    padding: 20px;
    color: var(--text2);
    text-align: center;
  }
  .host-calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .host-calendar-nav > span {
    min-width: 160px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
  }
  .host-calendar-weekdays,
  .host-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }
  .host-calendar-weekdays {
    margin-bottom: 4px;
    color: var(--text2);
    font-size: 12px;
    text-align: center;
  }
  .host-calendar-weekdays .is-weekend,
  .host-calendar-day.is-weekend { color: var(--accent2); }
  .host-calendar-day.is-today { color: var(--green); }
  .host-calendar-cell {
    position: relative;
    min-width: 0;
    min-height: 54px;
    padding: 3px 4px;
    border-radius: 6px;
    font-size: 11px;
  }
  .host-calendar-day { font-size: 12px; font-weight: 700; }
  .host-calendar-shift {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .host-replacement-summary {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--surface2);
    border-radius: 8px;
    font-size: 14px;
  }
  .host-replacement-summary span { color: var(--text2); }
  .host-card-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(123,137,180,0.24);
  }
  .host-card-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .host-card-section-title { font-size: 14px; font-weight: 700; }
  .host-card-section-help { margin-bottom: 8px; color: var(--text2); font-size: 11px; }
  .host-card-section-content { display: flex; flex-direction: column; gap: 8px; }
  .host-card-year-strip {
    display: flex;
    gap: 6px;
    padding-bottom: 2px;
    overflow-x: auto;
  }
  .host-card-year-button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
  .host-card-year-button span { opacity: .75; }
  .host-card-record-list { display: flex; flex-direction: column; gap: 6px; }
  .host-card-record {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--surface2);
    border-radius: 8px;
    font-size: 13px;
  }
  .host-card-record-note { color: var(--text2); font-style: italic; }
  .host-card-record-delete { margin-left: auto; }
  .host-card-inline-empty { color: var(--text2); font-size: 13px; }
  .host-card-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  .host-card-inline-field {
    display: grid;
    gap: 3px;
    color: var(--text2);
    font-size: 11px;
  }
  .host-card-inline-field.is-wide { flex: 1; min-width: 190px; }
  .host-card-footer { justify-content: space-between; }
  .modal-host-card .table-wrap {
    box-shadow: none;
  }
  .modal-host-card td {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .modal-week-create {
    width: 96vw;
    max-width: 1320px !important;
    max-height: 92vh;
    overflow-y: auto;
  }
  .week-create-controls {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
    gap: 16px;
    align-items: end;
  }
  .week-create-period {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 10px;
    background: rgba(13,17,26,0.48);
  }
  .week-create-period span,
  .week-create-preview-head span {
    color: var(--text2);
    font-size: 12px;
  }
  .week-create-period strong {
    color: var(--text1);
    font-size: 14px;
  }
  .week-create-preview-wrap {
    margin-top: 18px;
  }
  .week-create-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .week-create-preview-head > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .week-create-preview {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 8px;
    min-width: 1098px;
  }
  .week-create-preview-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .week-create-day {
    padding: 8px;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 10px;
    background: rgba(11,15,24,0.54);
  }
  .week-create-day-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
    padding: 0 2px 7px;
    border-bottom: 1px solid rgba(123,137,180,0.14);
  }
  .week-create-day-head strong {
    color: var(--text1);
    font-size: 12px;
    text-transform: uppercase;
  }
  .week-create-day-head span {
    color: var(--text2);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .week-create-slots {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .week-create-slot {
    --slot-accent: #6c7fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 42px;
    padding: 6px 7px;
    border: 1px solid color-mix(in srgb, var(--slot-accent), transparent 62%);
    border-left: 3px solid var(--slot-accent);
    border-radius: 7px;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--slot-accent), transparent 86%), transparent 72%),
      rgba(41,49,72,0.7);
  }
  .week-create-slot.show {
    border-color: color-mix(in srgb, var(--slot-accent), transparent 58%);
    border-left-color: var(--slot-accent);
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--slot-accent), transparent 82%), transparent 76%),
      rgba(35,40,57,0.72);
  }
  .week-create-slot.empty {
    border-color: rgba(255,95,109,0.45);
    border-left-color: #ff5f6d;
  }
  .week-create-slot span {
    color: var(--text2);
    font-size: 10px;
    font-weight: 700;
  }
  .week-create-slot strong {
    color: var(--slot-accent);
    font-size: 11px;
    line-height: 1.25;
  }
  .week-create-empty {
    padding: 12px 6px;
    color: #ff9aa3;
    font-size: 11px;
    text-align: center;
  }
  .confirm-discard {
    color: #ff9aa3;
    border-color: rgba(255,95,109,0.3);
  }

  .modal-week-editor {
    padding: 26px;
    max-width: 1320px;
    width: 98vw;
    max-height: 90vh;
    overflow-y: auto;
  }
  .week-editor-head,
  .guests-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
  }
  .modal-kicker {
    color: var(--text2);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .modal-icon-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 10px;
    background: rgba(15,19,29,0.68);
    color: var(--text2);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: background .15s, color .15s, transform .15s, border-color .15s;
  }
  .modal-icon-close:hover {
    background: rgba(255,95,109,0.14);
    border-color: rgba(255,95,109,0.42);
    color: #ff8b95;
    transform: translateY(-1px);
  }
  .confirm-overlay {
    z-index: 4000;
  }
  .confirm-modal {
    width: min(520px, calc(100vw - 32px));
    padding: 22px;
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(30,36,52,0.98), rgba(21,26,39,0.98));
    box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  }
  .confirm-modal-danger {
    border-color: rgba(255,95,109,0.34);
  }
  .confirm-modal-warning {
    border-color: rgba(245,196,81,0.34);
  }
  .confirm-modal-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
  }
  .confirm-modal-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    background: rgba(124,141,253,0.22);
    border: 1px solid rgba(124,141,253,0.34);
  }
  .confirm-icon-danger {
    background: rgba(255,95,109,0.18);
    border-color: rgba(255,95,109,0.4);
    color: #ff9aa3;
  }
  .confirm-icon-warning {
    background: rgba(245,196,81,0.14);
    border-color: rgba(245,196,81,0.34);
    color: #f7d47b;
  }
  .confirm-modal-message {
    color: var(--text2);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px 52px;
    white-space: normal;
  }
  .confirm-modal-message p {
    margin: 0 0 6px;
  }
  .confirm-modal-date { display: grid; gap: 7px; margin: 15px 0 4px 52px; }
  .confirm-modal-date > span { color: var(--text2); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .confirm-modal-date .form-input { width: 100%; min-height: 42px; }
  .confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }
  @media (max-width: 768px) {
    .confirm-modal-message,
    .confirm-modal-date { margin-left: 0; }
    .week-create-controls { grid-template-columns: 1fr; }
    .modal-week-create { width: 100%; }
  }
  .modal-week-editor .modal-title {
    margin-bottom: 0;
  }
  .edit-week-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .week-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 12px;
    background: rgba(15,19,29,0.46);
  }
  .week-editor-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: -4px 2px 12px;
    color: var(--text2);
    font-size: 10px;
    font-weight: 650;
  }
  .week-editor-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .week-editor-legend i {
    width: 14px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
  }
  .week-editor-legend .is-replacement { color: #72e69c; }
  .week-editor-legend .is-conflict { color: #f7d47b; }
  .week-editor-legend .is-empty { color: #ff8b95; }
  .week-editor-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }
  .week-editor-status {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }
  .week-editor-status.vacation {
    background: rgba(255,215,64,0.12);
    color: #ffd740;
  }
  .week-editor-status.absence {
    background: rgba(148,163,184,0.12);
    color: var(--text2);
  }
  .modal-week-editor .edit-week-grid {
    gap: 6px;
    align-items: start;
  }
  .modal-week-editor .edit-week-day {
    position: relative;
    background: rgba(15,19,29,0.58);
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 9px;
    padding: 6px;
  }
  .modal-week-editor .edit-week-day.is-weekend {
    background: linear-gradient(180deg, rgba(255,104,119,.055), rgba(15,19,29,.58) 110px);
    border-color: rgba(255,125,137,.19);
  }
  .modal-week-editor .edit-week-day.is-weekend-start {
    margin-left: 8px;
  }
  .modal-week-editor .edit-week-day.is-weekend-start::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255,142,151,.3);
  }
  .modal-week-editor .edit-week-day-header {
    padding: 0 2px 6px;
    min-height: 20px;
    color: var(--text1);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.3px;
    text-transform: uppercase;
  }
  .week-day-type-select {
    margin-bottom: 7px !important;
    height: 32px;
    font-size: 11px;
  }
  .week-slot-card {
    position: relative;
    margin-bottom: 5px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
    transition: border-color .15s, background-color .15s, transform .15s;
  }
  .week-slot-card.is-replacement {
    border-color: rgba(67,233,123,0.64);
    background:
      linear-gradient(90deg, rgba(67,233,123,0.11), transparent 72%),
      var(--surface2);
    box-shadow: inset 3px 0 0 rgba(67,233,123,0.88), inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .week-slot-card.is-empty {
    border-color: rgba(255,95,109,0.5);
    background:
      linear-gradient(90deg, rgba(255,95,109,0.11), transparent 72%),
      var(--surface2);
    box-shadow: inset 3px 0 0 rgba(255,95,109,0.86), inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .week-slot-card.has-host-conflict {
    border-color: rgba(245,196,81,0.58);
  }
  .week-slot-card.dropdown-open {
    z-index: 140;
  }
  .week-slot-card:hover {
    border-color: rgba(124,141,253,0.46) !important;
    transform: translateY(-1px);
  }
  .week-slot-card select {
    height: 34px;
  }
  .week-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
  }
  .week-slot-time {
    color: var(--text2);
    font-size: 11px;
    font-weight: 750;
  }
  .week-slot-actions {
    display: flex;
    gap: 4px;
  }
  .week-slot-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text2);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    opacity: .62;
    transition: opacity .15s, color .15s, background .15s;
  }
  .week-slot-icon-btn:hover {
    opacity: 1;
    background: rgba(124,141,253,0.1);
  }
  .week-slot-icon-btn.is-edit:hover { color: #8fa0ff; }
  .week-slot-icon-btn.is-delete:hover {
    color: #ff8b95;
    background: rgba(255,95,109,0.1);
  }
  .week-slot-show-title {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
  }
  .week-show-hosts {
    margin-top: 6px;
  }
  .week-count-hours,
  .week-show-host-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
  }
  .week-count-hours {
    color: var(--text2);
    font-size: 10px;
    font-weight: 650;
  }
  .week-show-host-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 8px;
    margin-top: 6px;
  }
  .week-show-host-option {
    min-width: 0;
    font-size: 11px;
  }
  .week-show-host-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .week-slot-select {
    font-size: 12px;
  }
  .week-host-select {
    position: relative;
  }
  .week-host-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(123,137,180,0.22);
    border-radius: 9px;
    background: rgba(7,10,17,0.72);
    color: var(--text1);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    transition: border-color .15s, background .15s, box-shadow .15s;
  }
  .week-host-select-button:hover,
  .week-host-select-button.open {
    border-color: rgba(124,141,253,0.58);
    background: rgba(15,20,33,0.9);
    box-shadow: 0 0 0 3px rgba(124,141,253,0.08);
  }
  .week-host-select-button.empty {
    color: var(--text2);
  }
  .week-host-select-button.conflict {
    border-color: rgba(245,196,81,0.56);
    box-shadow: 0 0 0 3px rgba(245,196,81,0.08);
  }
  .week-host-select-arrow {
    color: var(--text2);
    font-size: 13px;
    line-height: 1;
  }
  .week-host-select-menu {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 6px);
    min-width: 100%;
    width: max(100%, 214px);
    z-index: 220;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(123,137,180,0.38);
    border-radius: 12px;
    background: #121722;
    box-shadow: 0 18px 46px rgba(0,0,0,0.38);
  }
  .week-host-option {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: #121722;
    color: var(--text1);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
  }
  .week-host-option:hover,
  .week-host-option.active {
    background: #202840;
  }
  .week-host-option.empty {
    display: block;
    color: var(--text2);
    font-weight: 650;
    background: #121722;
  }
  .week-host-option.warning {
    padding-right: 8px;
  }
  .week-host-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
  .week-host-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .week-host-option-warning {
    flex: 0 0 auto;
    color: #ffd740;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
  }
  .week-slot-penalty {
    color: #ff8b95;
    font-size: 11px;
    font-weight: 750;
    margin-top: 4px;
  }
  .week-slot-replacement-note,
  .week-slot-conflict-note {
    margin-top: 5px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.35;
  }
  .week-slot-replacement-note { color: #72e69c; }
  .week-slot-conflict-note { color: #f7d47b; }
  .week-add-slot {
    width: 100%;
    margin-top: 6px;
  }
  .week-editor-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .week-editor-actions-note {
    color: var(--text2);
    font-size: 12px;
  }
  .week-editor-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .guests-panel .admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
  }
  .guests-panel .admin-section-header h2 {
    font-size: 20px;
    font-weight: 850;
    margin: 0;
  }
  .guests-panel .admin-section-header p {
    color: var(--text2);
    font-size: 13px;
    margin: 4px 0 0;
  }
  .guests-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }
  .guests-summary .summary-card {
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(31,37,54,0.86), rgba(20,25,37,0.86));
    padding: 14px 16px;
  }
  .summary-label {
    display: block;
    color: var(--text2);
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 8px;
  }
  .summary-card strong {
    color: var(--text1);
    font-size: 28px;
    font-weight: 900;
  }
  .guests-show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
  .guest-show-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 94px;
    padding: 16px;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(31,37,54,0.92), rgba(18,23,34,0.92));
    color: var(--text1);
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  }
  .guest-show-card:hover {
    border-color: rgba(124,141,253,0.5);
    background: linear-gradient(180deg, rgba(37,45,67,0.96), rgba(20,25,38,0.96));
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
    transform: translateY(-1px);
  }
  .guest-show-card.has-upcoming {
    border-color: rgba(67,233,123,0.28);
  }
  .guest-show-card.has-upcoming::after {
    content: "";
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(67,233,123,0.42);
  }
  .guest-show-name {
    max-width: calc(100% - 18px);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.25;
  }
  .guest-show-meta {
    color: var(--text2);
    font-size: 13px;
    font-weight: 650;
  }
  .modal-guests {
    max-width: 820px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }
  .guests-modal-actions,
  .guest-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .guest-form-panel {
    background: rgba(31,37,54,0.86);
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
  }
  .guest-form-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
  }
  .guest-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 120px;
    gap: 10px;
    margin-bottom: 10px;
  }
  .guests-add-btn {
    margin-bottom: 14px;
  }
  .guest-list-section {
    margin-bottom: 20px;
  }
  .guest-list-title {
    color: var(--text2);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    text-transform: uppercase;
  }
  .guest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .guest-row.past {
    opacity: 0.68;
  }
  .guest-empty {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px dashed rgba(123,137,180,0.22);
    border-radius: 10px;
    background: rgba(15,19,29,0.35);
  }

  .weeks-panel .weeks-header,
  .analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
  }
  .weeks-panel .weeks-header h2,
  .analytics-header h2 {
    font-size: 20px;
    font-weight: 850;
    margin: 0;
    letter-spacing: 0;
  }
  .weeks-panel .weeks-header p,
  .analytics-header p {
    color: var(--text2);
    font-size: 13px;
    margin: 4px 0 0;
  }
  .weeks-table-wrap {
    border-radius: 14px;
    background: rgba(12,16,24,0.62);
    box-shadow: 0 20px 60px rgba(0,0,0,0.14);
    overflow: visible;
  }
  /* Фиксированная сетка: ширины колонок не зависят от содержимого,
     поэтому при раскрытии прошлых недель ничего не «скачет». */
  .weeks-table { table-layout: fixed; }
  .weeks-table .col-period  { width: 292px; }   /* влезает «22 июня — 28 июня 2026 года» */
  .weeks-table .col-note    { width: auto;  }   /* забирает остаток */
  .weeks-table .col-status  { width: 190px; }
  .weeks-table .col-public  { width: 96px;  }
  .weeks-table .col-actions { width: 250px; }
  .weeks-table .week-period-cell { padding-right: 18px; }
  /* Заметка и прочерк — единообразно по левому краю колонки (как заголовок). */
  .weeks-table th, .weeks-table td { vertical-align: middle; }
  .week-row td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .week-row-current {
    box-shadow: inset 3px 0 0 var(--accent);
    background: linear-gradient(90deg, rgba(79,110,247,0.14), rgba(79,110,247,0.04));
  }
  .week-period-cell {
    font-weight: 800;
    white-space: nowrap;
  }
  .week-note-cell {
    color: #d7dced;
    /* Ширину задаёт colgroup (col-note). Длинная заметка обрезается
       многоточием; полный текст — в title. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .week-status-select {
    font-size: 13px !important;
    padding: 5px 10px !important;
    height: 34px !important;
    width: 100% !important;
    min-width: 0 !important;    /* было 188px — распирало колонку статуса */
    border-radius: 9px !important;
    font-weight: 750;
  }
  /* Статус-селект тянется на всю (фиксированную) колонку */
  .weeks-table .rr-status-select { width: 100%; min-width: 0; }
  .weeks-actions {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
  }
  .weeks-edit-primary { min-width: 112px; justify-content: center; }
  .weeks-action-trigger {
    min-width: 110px;
    justify-content: space-between;
  }
  .weeks-action-trigger span { color: var(--text3); letter-spacing: 1px; }
  .weeks-action-menu {
    position: absolute;
    z-index: 260;
    top: calc(100% + 6px);
    right: 0;
    width: 214px;
    padding: 6px;
    border: 1px solid rgba(123,137,180,.3);
    border-radius: 12px;
    background: #121722;
    box-shadow: 0 20px 54px rgba(0,0,0,.42);
  }
  .weeks-action-menu button {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 6px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text1);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    text-align: left;
  }
  .weeks-action-menu button:hover { background: rgba(124,141,253,.13); }
  .weeks-action-menu button b { color: var(--text2); text-align: center; }
  .weeks-action-menu button.danger { color: #ff9aa3; }
  .weeks-action-menu button.danger:hover { background: rgba(255,95,109,.12); }
  .weeks-calendar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    gap: 7px;
    margin: -4px 0 16px;
    padding: 2px 2px 8px;
    overflow-x: auto;
  }
  .weeks-calendar-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 2px 6px;
    min-height: 70px;
    padding: 10px 11px;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 12px;
    background: rgba(17,21,31,.82);
    color: var(--text1);
    cursor: pointer;
    text-align: left;
    transition: transform .15s, border-color .15s, background .15s;
  }
  .weeks-calendar-item::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 6px;
    height: 3px;
    border-radius: 99px;
    background: var(--text3);
    opacity: .45;
  }
  .weeks-calendar-item:hover { transform: translateY(-1px); border-color: rgba(124,141,253,.48); }
  .weeks-calendar-item.current { border-color: rgba(124,141,253,.7); background: rgba(79,110,247,.14); }
  .weeks-calendar-item.is-ready::after { background: var(--green); opacity: .9; }
  .weeks-calendar-item.is-replace::after { background: var(--red); opacity: .9; }
  .weeks-calendar-item.is-review::after { background: var(--yellow); opacity: .9; }
  .weeks-calendar-item.is-approved::after { background: var(--accent); opacity: .9; }
  .weeks-calendar-item.unpublished { border-style: dashed; }
  .weeks-calendar-month { color: var(--text2); font-size: 10px; font-weight: 850; text-transform: uppercase; }
  .weeks-calendar-item strong { font-size: 16px; }
  .weeks-calendar-item small { grid-column: 1 / -1; overflow: hidden; color: var(--text2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .week-public-cell { text-align: center; }
  .week-row-past { opacity: .6; }
  /* Аккордеон прошедших недель по месяцам */
  .weeks-month-row td {
    padding: 4px 10px;
    background: rgba(20,26,40,0.55);
  }
  .weeks-month-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
  }
  .weeks-month-toggle:hover { color: var(--text); }
  .weeks-month-arrow { width: 12px; font-size: 11px; }
  .weeks-month-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(79,110,247,0.16);
    color: #aab7ff;
    font-size: 11px;
    font-weight: 750;
  }

  /* На телефоне широкая служебная таблица превращается в карточки.
     Это убирает 1158px desktop-сетки, из-за которой Chrome показывал всю
     админку микроскопической и вынуждал масштабировать страницу жестом. */
  @media (max-width: 768px) {
    .weeks-panel { min-width: 0; }
    .weeks-panel .weeks-header {
      align-items: stretch;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 14px;
    }
    .weeks-panel .weeks-header .btn { align-self: flex-start; }
    .weeks-table-wrap {
      margin: 0;
      overflow: visible;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .weeks-table,
    .weeks-table tbody {
      display: block;
      width: 100%;
      min-width: 0;
    }
    .weeks-table colgroup,
    .weeks-table thead { display: none; }
    .weeks-table tr.week-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px 12px;
      width: 100%;
      margin-bottom: 10px;
      padding: 14px;
      border: 1px solid rgba(123,137,180,.22);
      border-radius: 12px;
      background: rgba(17,21,31,.9);
      box-shadow: 0 12px 30px rgba(0,0,0,.12);
    }
    .weeks-table tr.week-row-current {
      border-color: rgba(108,127,255,.5);
      box-shadow: inset 3px 0 0 var(--accent), 0 12px 30px rgba(0,0,0,.12);
      background: linear-gradient(90deg, rgba(79,110,247,.13), rgba(17,21,31,.9) 46%);
    }
    .weeks-table tr.week-row-past { opacity: .72; }
    .weeks-table tr.week-row > td {
      display: block;
      min-width: 0;
      padding: 0;
      border: 0;
      background: transparent;
      white-space: normal;
    }
    .weeks-table tr.week-row:hover > td { background: transparent; }
    .weeks-table .week-period-cell {
      grid-column: 1 / -1;
      padding: 0 0 10px;
      border-bottom: 1px solid rgba(123,137,180,.16);
      font-size: 15px;
      line-height: 1.35;
    }
    .weeks-table .week-note-cell {
      grid-column: 1 / -1;
      overflow: visible;
      text-overflow: clip;
      white-space: normal;
      line-height: 1.35;
    }
    .weeks-table .week-note-cell::before,
    .weeks-table .week-status-cell::before,
    .weeks-table .week-public-cell::before {
      content: attr(data-label);
      display: block;
      margin-bottom: 5px;
      color: var(--text2);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .weeks-table .week-status-cell { grid-column: 1; }
    .weeks-table .week-public-cell {
      grid-column: 2;
      min-width: 66px;
      text-align: left;
    }
    .weeks-table .week-public-cell .toggle-wrap {
      min-height: 34px;
      justify-content: flex-start;
    }
    .weeks-table .week-actions-cell { grid-column: 1 / -1; }
    .weeks-actions {
      display: flex;
      justify-content: stretch;
    }
    .weeks-actions .weeks-edit-primary { flex: 1 1 auto; }
    .weeks-actions .weeks-action-trigger {
      flex: 1 1 auto;
      width: auto;
    }
    .weeks-action-menu {
      left: 0;
      right: auto;
      width: min(280px, 100%);
    }
    .weeks-archive-toggle-row,
    .weeks-month-row { display: block; }
    .weeks-archive-toggle-row td,
    .weeks-month-row td {
      display: block;
      width: 100%;
      padding: 6px 0;
      border: 0;
      background: transparent;
      white-space: normal;
    }
    .weeks-archive-toggle-row .btn { width: 100%; }
    .weeks-month-toggle {
      min-height: 38px;
      padding: 8px 10px;
      border: 1px solid rgba(123,137,180,.16);
      border-radius: 9px;
      background: rgba(20,26,40,.55);
    }
  }

  .show-day-panel {
    padding: 20px !important;
  }
  .show-day-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(123,137,180,0.16);
  }
  .show-day-header h4 {
    font-size: 18px;
    font-weight: 850;
    margin: 0;
  }
  .show-day-header p {
    color: var(--text2);
    font-size: 13px;
    margin: 4px 0 0;
  }
  .show-day-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .show-day-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    max-width: 340px;
  }
  .show-day-metrics > div {
    background: rgba(21,25,35,0.74);
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 12px;
    padding: 11px 13px;
  }
  .show-day-metrics span {
    display: block;
    color: var(--text2);
    font-size: 12px;
    margin-bottom: 3px;
  }
  .show-day-metrics b {
    color: var(--text);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }
  .show-day-chart-wrap {
    width: 100%;
    min-height: 280px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 12px;
    background: rgba(10,14,22,0.34);
  }
  .show-day-chart {
    display: block;
    width: 100% !important;
    height: 260px !important;
  }
  .show-day-slot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
  }
  .show-day-slot-chip {
    font-size: 11px;
    font-weight: 750;
    padding: 5px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .15s, filter .15s;
  }
  .show-day-slot-chip:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
  }
  .show-day-slot-detail {
    background: rgba(10,14,22,0.48);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 3px solid;
  }
  .show-empty-state {
    text-align: center;
    padding: 54px 24px !important;
  }
  .show-empty-state h3 {
    font-size: 18px;
    margin: 0 0 8px;
  }
  .show-empty-state p {
    color: var(--text2);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.55;
  }

  .analytics-panel .analytics-toolbar {
    margin-bottom: 16px;
  }
  .analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .analytics-summary-card {
    background: rgba(21,25,35,0.84);
    border: 1px solid rgba(123,137,180,0.2);
    border-radius: 12px;
    padding: 13px 14px;
  }
  .analytics-summary-card span {
    display: block;
    color: var(--text2);
    font-size: 12px;
    margin-bottom: 5px;
  }
  .analytics-summary-card b {
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
  }
  .analytics-summary-leader {
    background: linear-gradient(135deg, rgba(79,110,247,0.18), rgba(21,25,35,0.84));
  }
  .analytics-grid-active {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
  .analytics-grid-active .analytics-card {
    border-radius: 12px;
    transition: transform .15s, border-color .15s, background .15s;
  }
  .analytics-grid-active .analytics-card:hover {
    transform: translateY(-1px);
    border-color: rgba(124,141,253,0.42);
    background: rgba(30,36,50,0.82);
  }
  .analytics-week-section,
  .analytics-workload-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(123,137,180,0.18);
  }
  .analytics-week-section h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px;
  }

  /* Визуальный редактор именованных шаблонов */
  .template-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
  }
  .template-editor-heading h2 {
    margin: 2px 0 4px;
    font-size: 22px;
    line-height: 1.2;
  }
  .template-editor-heading p {
    margin: 0;
    color: var(--text2);
    font-size: 13px;
  }
  .template-editor-kicker {
    color: #9ba9ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  .template-editor-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
  }
  .template-version-toolbar {
    position: sticky;
    top: 66px;
    z-index: 20;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 12px;
    background: rgba(15,19,29,.96);
    box-shadow: 0 10px 28px rgba(3,6,14,.22);
    backdrop-filter: blur(12px);
  }
  .template-version-picker {
    flex: 1;
    min-width: 250px;
    max-width: 520px;
  }
  .template-version-select .rr-select-button {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 14px;
  }
  .template-version-choice {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }
  .template-version-choice-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .template-version-choice-status {
    flex: 0 0 auto;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
  }
  .template-version-choice-status.is-active {
    color: #72ef9d;
    font-weight: 900;
  }
  .template-version-option {
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
  }
  .template-version-option .template-version-choice-status.is-draft { color: #cbd2ff; }
  .template-version-picker label,
  .template-name-field label {
    display: block;
    margin-bottom: 4px;
    color: var(--text2);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .template-version-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
  }
  .template-version-actions .btn-success {
    background: rgba(62,224,122,.16);
    border-color: rgba(62,224,122,.5);
    color: #88f5ad;
  }
  .template-version-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    cursor: default;
    white-space: nowrap;
  }
  .template-version-status-label { font-weight: 650; opacity: .72; }
  .template-version-status strong { color: inherit; font-weight: inherit; }
  .template-version-status.is-active {
    border: 1px solid rgba(62,224,122,.46);
    background: rgba(62,224,122,.16);
    color: #8af5ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .025em;
    box-shadow: 0 0 0 1px rgba(62,224,122,.05), 0 4px 14px rgba(25,142,70,.1);
  }
  .template-version-status.is-active::before {
    content: '';
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #42e77d;
    box-shadow: 0 0 0 3px rgba(66,231,125,.12);
  }
  .template-version-status.is-draft { background: rgba(124,141,253,.16); color: #cbd2ff; }
  .template-dirty-indicator {
    color: #ffcb66;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
  }
  .template-history-btn { gap: 5px; }
  .template-history-btn span { font-size: 11px; }
  .template-workflow-help {
    margin: -3px 0 12px;
    padding: 9px 12px;
    border: 1px solid rgba(124,141,253,.2);
    border-radius: 10px;
    background: rgba(124,141,253,.07);
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .template-workflow-help b { color: var(--text1); }
  .template-workflow-help.is-active {
    border-color: rgba(62,224,122,.2);
    background: rgba(62,224,122,.055);
  }
  .template-editor-loading {
    padding: 52px 18px;
    text-align: center;
    color: var(--text2);
  }
  .template-editor-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(123,137,180,.16);
    border-radius: 12px;
    background: rgba(18,22,32,.62);
  }
  .template-name-field { flex: 1; max-width: 520px; }
  .template-summary-metrics {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .template-summary-metrics span {
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(123,137,180,.09);
    color: var(--text2);
    font-size: 12px;
    white-space: nowrap;
  }
  .template-summary-metrics b { color: var(--text); }
  .template-readonly-banner,
  .template-modal-note {
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .template-readonly-banner {
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(124,141,253,.22);
    border-radius: 10px;
    background: rgba(124,141,253,.08);
    color: #cbd2ff;
  }
  .template-activation-note,
  .permission-activation-warning {
    padding: 10px 12px;
    border: 1px solid rgba(245,196,81,.28);
    border-radius: 10px;
    background: rgba(245,196,81,.09);
    color: #e8d59b;
    font-size: 12px;
    line-height: 1.45;
  }
  .template-activation-note { margin: -2px 0 12px; }
  .permission-activation-warning { margin-top: 9px; }
  .template-activation-note b,
  .permission-activation-warning b { color: #f7d47b; }
  .template-host-palette {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
    gap: 10px 14px;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(123,137,180,.18);
    border-radius: 12px;
    background: rgba(11,14,20,.56);
  }
  .template-palette-title b { display: block; margin-bottom: 2px; }
  .template-palette-title span { color: var(--text2); font-size: 12px; }
  .template-host-chips {
    grid-column: 1 / -1;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
  }
  .template-host-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--host-color), transparent 55%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--host-color), transparent 88%);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: grab;
  }
  .template-host-chip span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--host-color);
  }
  .template-week-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .template-week-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 8px;
    min-width: 1120px;
  }
  .template-day-column {
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 12px;
    background: rgba(11,14,20,.5);
  }
  .template-day-column > header,
  .template-special-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 58px;
    padding: 10px;
    border-bottom: 1px solid rgba(123,137,180,.18);
  }
  .template-day-column.is-weekday > header { background: rgba(62,224,122,.12); }
  .template-day-column.is-friday > header { background: rgba(255,200,87,.14); }
  .template-day-column.is-weekend > header { background: rgba(255,112,126,.13); }
  .template-day-column header b,
  .template-special-card header b { display: block; font-size: 14px; }
  .template-day-column header span,
  .template-special-card header span { display: block; margin-top: 2px; color: var(--text2); font-size: 11px; }
  .template-day-heading { min-width: 0; flex: 1; }
  .template-day-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 7px;
  }
  .template-day-title-row span { flex: 0 0 auto; margin-top: 0 !important; }
  .template-day-source-select {
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    padding: 5px 24px 5px 7px;
    border: 1px solid rgba(123,137,180,.28);
    border-radius: 7px;
    background: rgba(11,14,20,.62);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
  }
  .template-day-title-select { margin-top: 7px; font-size: 11px; font-weight: 650; }
  .template-day-cards {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 450px;
    padding: 8px;
  }
  .template-grid-slot {
    position: relative;
    padding: 9px;
    border: 1px solid rgba(123,137,180,.2);
    border-left-width: 3px;
    border-radius: 9px;
    background: rgba(24,29,42,.92);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
  }
  .template-grid-slot.is-linear { border-left-color: #7c8dfd; }
  .template-grid-slot.is-show { border-left-color: #f5c451; background: rgba(92,70,22,.22); }
  .template-grid-slot.is-service { border-left-color: #9aa4be; background: rgba(106,116,143,.11); }
  .template-grid-slot.is-unassigned {
    border-color: rgba(255,82,103,.9);
    background: rgba(91,24,35,.28);
    box-shadow: 0 0 0 1px rgba(255,82,103,.38), 0 4px 12px rgba(0,0,0,.12);
  }
  .template-grid-slot.is-unassigned .template-grid-slot-title { color: #ff9eaa; }
  .template-grid-slot.is-unassigned .template-host-select { border-color: rgba(255,82,103,.58); }
  .template-grid-slot.is-draggable { cursor: grab; }
  .template-grid-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: #cbd2ff;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .template-grid-slot-actions { display: flex; gap: 3px; }
  .template-grid-slot-actions button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(123,137,180,.12);
    color: var(--text2);
    cursor: pointer;
  }
  .template-grid-slot-actions button:hover { color: #fff; background: rgba(124,141,253,.25); }
  .template-grid-slot-title {
    margin: 7px 0 6px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .template-grid-slot-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    color: var(--text2);
    font-size: 10px;
  }
  .template-grid-slot-meta span {
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(123,137,180,.1);
  }
  .template-grid-slot-meta small { flex-basis: 100%; margin-top: 2px; color: #d6d9e5; }
  .template-host-select {
    width: 100%;
    height: 29px;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 7px;
    background: rgba(10,13,20,.7);
    color: var(--text);
    font-size: 11px;
  }
  .template-empty-day {
    min-height: 54px;
    border: 1px dashed rgba(123,137,180,.28);
    border-radius: 9px;
    background: transparent;
    color: var(--text2);
    cursor: pointer;
  }
  .template-special-days {
    margin-top: 16px;
    border: 1px solid rgba(123,137,180,.18);
    border-radius: 12px;
    background: rgba(15,19,29,.42);
  }
  .template-special-days > summary {
    padding: 13px 15px;
    font-weight: 800;
    cursor: pointer;
  }
  .template-special-days > summary span { color: var(--text2); font-size: 12px; }
  .template-special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 0 12px 12px;
  }
  .template-special-card { overflow: hidden; border: 1px solid rgba(123,137,180,.16); border-radius: 10px; }
  .template-special-slot {
    display: flex;
    width: calc(100% - 12px);
    gap: 8px;
    margin: 6px;
    padding: 8px;
    border: 0;
    border-radius: 7px;
    background: rgba(123,137,180,.09);
    color: var(--text);
    text-align: left;
  }
  .template-special-slot b { white-space: nowrap; font-size: 11px; }
  .template-special-slot span { font-size: 12px; }
  .template-special-help { margin: 0 14px 12px; color: var(--text2); font-size: 12px; line-height: 1.45; }
  .template-special-create { margin: 0 14px 12px; }
  .template-special-actions { display: flex; gap: 4px; }
  .template-modal-note { margin-top: 7px; }
  .week-slot-hours-hosts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    max-height: 220px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 9px;
    background: rgba(11,14,20,.45);
  }
  .week-slot-hours-hosts .form-check { min-width: 0; font-size: 12px; }
  .week-slot-hours-hosts .form-check span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .template-modal-selected-hosts {
    margin: 7px 0;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.4;
  }
  .template-modal-empty {
    padding: 5px 2px;
    color: var(--text2);
    font-size: 12px;
  }

  @media (max-width: 900px) {
    .template-editor-heading,
    .template-editor-summary,
    .template-version-toolbar { align-items: stretch; flex-direction: column; }
    .template-version-picker { min-width: 0; max-width: none; }
    .template-version-actions { justify-content: flex-start; }
    .template-host-palette { grid-template-columns: 1fr; }
    .template-host-chips { grid-column: auto; }
    .template-week-board {
      grid-template-columns: minmax(270px, 1fr);
      min-width: 0;
    }
    .template-day-column { min-height: 0; }
    .template-day-cards { min-height: 90px; }
    .template-version-toolbar { position: static; }
  }

  .settings-layout {
    align-items: flex-start;
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }
  .settings-sidebar {
    width: auto;
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .settings-nav-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(123,137,180,0.14);
    border-radius: 10px;
    background: rgba(21,25,35,0.8);
    color: var(--text2);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
    width: 100%;
    font-family: inherit;
    text-align: left;
  }
  .settings-nav-item:hover {
    color: var(--text);
    border-color: rgba(123,137,180,0.32);
    transform: translateY(-1px);
  }
  .settings-nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, #4f6ef7, #637bff);
    border-color: rgba(124,141,253,0.58);
    box-shadow: 0 12px 28px rgba(79,110,247,0.18);
  }
  .settings-content {
    max-width: 1140px;
    min-width: 0;
  }
  .settings-content h3 {
    margin-bottom: 14px !important;
  }
  .settings-content h4 {
    color: var(--text);
    letter-spacing: 0;
  }
  .settings-page-head {
    max-width: 1140px;
  }
  .settings-panel {
    display: grid;
    gap: 16px;
  }
  .settings-panel-title {
    margin: 0 !important;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(123,137,180,0.16);
  }
  .settings-card,
  .settings-maintenance,
  .settings-system-alert {
    background:
      radial-gradient(circle at 0% 0%, rgba(79,110,247,0.08), transparent 32%),
      linear-gradient(180deg, rgba(27,32,45,0.94), rgba(18,23,34,0.94)) !important;
    border-color: rgba(123,137,180,0.24) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }
  .settings-card {
    padding: 18px !important;
  }
  .settings-card-narrow {
    max-width: 540px !important;
  }
  .settings-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0 !important;
    color: var(--text) !important;
    font-size: 15px !important;
  }
  .settings-content .data-table {
    border-radius: 12px;
    overflow: hidden;
  }
  .modal-user-access {
    max-width: 720px;
    --modal-pad: 28px;
  }
  .permission-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .permission-preset {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid rgba(123,137,180,0.22);
    border-radius: 10px;
    background: rgba(15,19,29,0.58);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
  }
  .permission-preset:hover {
    transform: translateY(-1px);
    border-color: rgba(124,141,253,0.48);
    background: rgba(31,38,57,0.86);
  }
  .permission-preset span {
    display: block;
    font-size: 13px;
    font-weight: 850;
  }
  .permission-preset small {
    display: block;
    margin-top: 4px;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.35;
  }
  .permission-help {
    color: var(--text2);
    font-size: 11px;
    line-height: 1.4;
    margin: -2px 0 8px;
  }
  .permission-matrix-scroll { overflow-x: auto; border-radius: 10px; }
  .permission-matrix {
    width: 100%;
    margin-top: 8px;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(15,19,29,0.34);
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 10px;
    overflow: hidden;
  }
  .permission-matrix th {
    background: rgba(35,42,60,0.82);
    padding: 7px 5px;
    color: var(--text2);
    font-size: 10px;
    font-weight: 750;
    text-align: center;
    white-space: normal;
  }
  .permission-matrix th.permission-section-column { min-width: 150px; text-align: left; }
  .permission-matrix th.is-activate { min-width: 92px; color: #d8c27f; }
  .permission-matrix tbody td { padding: 7px 5px; border-top: 1px solid rgba(123,137,180,.12); text-align: center; }
  .permission-matrix tbody td:first-child { color: var(--text); font-size: 12px; font-weight: 650; text-align: left; }
  .permission-section-hint { display: block; max-width: 250px; margin-top: 3px; color: var(--text2); font-size: 10px; font-weight: 400; line-height: 1.25; }
  .permission-matrix input { accent-color: var(--accent); cursor: pointer; }
  .permission-matrix td > span { color: var(--text2); }
  .permission-matrix td > .permission-section-name { color: var(--text); }
  .show-access-mode {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(123,137,180,0.20);
    border-radius: 10px;
    background: rgba(15,19,29,0.58);
    margin-bottom: 10px;
  }
  .show-access-mode label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--text2);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
  }
  .show-access-mode label.active {
    background: rgba(79,110,247,0.22);
    color: var(--text);
  }
  .show-access-mode input {
    accent-color: var(--accent);
  }
  .show-access-list {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
  }
  .show-access-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid rgba(123,137,180,0.16);
    border-radius: 8px;
    background: rgba(15,19,29,0.36);
    cursor: pointer;
  }
  .show-access-short {
    min-width: 70px;
    font-weight: 850;
  }
  .show-access-name {
    color: var(--text2);
    font-size: 12px;
  }
  .permission-summary {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 10px;
    background: rgba(15,19,29,0.42);
    color: var(--text2);
    font-size: 12px;
    line-height: 1.45;
  }
  .permission-summary-title {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .permission-summary-empty {
    padding: 8px 0;
    color: var(--text2);
  }
  .permission-summary-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1.5fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-top: 1px solid rgba(123,137,180,0.12);
  }
  .permission-summary-row:first-of-type {
    border-top: 0;
  }
  .permission-summary-section {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
  }
  .host-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .host-form-grid .form-group { margin: 0; min-width: 0; }
  .host-form-wide { grid-column: 1 / -1; }
  .host-form-birthday { display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; }
  .host-form-color {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 5px 8px;
    border: 1px solid rgba(123,137,180,.26);
    border-radius: 9px;
    background: #0d111a;
  }
  .host-form-color input {
    flex: 0 0 auto;
    width: 42px;
    height: 30px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
  }
  .host-form-color span {
    min-width: 0;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.3;
  }
  .host-form-color span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--host-preview-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--host-preview-color), transparent 80%);
  }
  .host-form-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  .host-form-help { margin-top: 5px; color: var(--text2); font-size: 11px; line-height: 1.4; }
  .host-form-active {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 11px;
    border: 1px solid rgba(123,137,180,.18);
    border-radius: 9px;
    background: rgba(35,42,60,.38);
    cursor: pointer;
  }
  .host-form-active input { accent-color: var(--green); }
  .host-form-active span { display: grid; gap: 2px; }
  .host-form-active b { color: var(--text); font-size: 12px; }
  .host-form-active small { color: var(--text2); font-size: 10px; }
  .permission-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }
  .permission-summary-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(123,137,180,0.18);
    border-radius: 999px;
    background: rgba(35,42,60,0.62);
    color: var(--text2);
    font-size: 11px;
    font-weight: 750;
  }
  .permission-summary-chip.primary {
    border-color: rgba(79,110,247,0.36);
    background: rgba(79,110,247,0.18);
    color: var(--text);
  }
  .permission-summary-note {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--text2);
    font-size: 11px;
  }
  .permission-summary-show.warning .permission-summary-chip.primary {
    border-color: rgba(255,209,67,0.42);
    background: rgba(255,209,67,0.12);
    color: var(--yellow);
  }

  .document-policy-message {
    padding: 18px;
    border: 1px dashed rgba(123,137,180,.22);
    border-radius: 10px;
    color: var(--text2);
    font-size: 12px;
    text-align: center;
  }
  .document-policy-message { padding: 9px 12px; border-style: solid; color: #9edeb8; }

  .host-document-settings { display: grid; gap: 12px; }
  .host-document-intro,
  .host-document-help {
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid rgba(124,141,253,.22);
    border-radius: 10px;
    background: rgba(124,141,253,.075);
    color: var(--text2);
    font-size: 12px;
    line-height: 1.5;
  }
  .host-document-intro strong { color: var(--text); font-size: 14px; }
  .host-document-kind {
    padding: 14px;
    border: 1px solid rgba(123,137,180,.2);
    border-radius: 11px;
    background: rgba(13,17,26,.72);
  }
  .host-document-kind-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
  .host-document-kind-head > div { display: grid; gap: 2px; }
  .host-document-kind-head strong { font-size: 14px; }
  .host-document-kind-head small { color: var(--text2); font-size: 11px; }
  .host-document-kind-actions { display: flex !important; align-items: center; justify-content: flex-end; gap: 8px !important; }
  .host-document-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 9px; border: 1px solid rgba(123,137,180,.2); border-radius: 8px; background: rgba(148,163,184,.07); color: var(--text2); font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
  .host-document-toggle.active { border-color: rgba(67,233,123,.32); background: rgba(67,233,123,.09); color: #9ce9b8; }
  .host-document-toggle input { accent-color: var(--green); }
  .host-document-effective-state { width: fit-content; margin: -3px 0 10px; padding: 4px 7px; border-radius: 999px; background: rgba(148,163,184,.09); color: var(--text2); font-size: 10px; font-weight: 750; }
  .host-document-effective-state.active { background: rgba(67,233,123,.11); color: #8ce7ad; }
  .host-document-name { display: grid; gap: 5px; max-width: 460px; margin-bottom: 10px; }
  .host-document-name > span,
  .host-document-period label > span { color: var(--text2); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
  .host-document-period-list { display: grid; gap: 7px; }
  .host-document-period {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 8px;
    align-items: end;
    padding: 9px;
    border: 1px solid rgba(123,137,180,.16);
    border-radius: 9px;
    background: rgba(35,42,60,.42);
  }
  .host-document-period label { display: grid; gap: 4px; }
  .host-document-remove { color: #ff8d99; }
  .host-document-history-lock { align-self: center; padding: 5px 7px; color: var(--text2); font-size: 10px; font-weight: 700; white-space: nowrap; }
  .host-document-disabled { padding: 12px; border: 1px dashed rgba(123,137,180,.24); border-radius: 9px; color: var(--text2); font-size: 12px; text-align: center; }

  @media (max-width: 1100px) {
    .host-card-filters {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .host-card-summary {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .settings-layout {
      grid-template-columns: 1fr;
    }
    .settings-sidebar {
      position: static;
      flex-direction: row;
      overflow-x: auto;
      padding-bottom: 2px;
    }
    .settings-nav-item {
      flex: 0 0 auto;
    }
  }
  @media (max-width: 768px) {
    .admin-nav {
      gap: 6px;
      margin-bottom: 20px;
      padding: 5px;
      border-radius: 11px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .admin-nav::-webkit-scrollbar { display: none; }
    .admin-nav-group { padding-top: 17px; }
    .admin-nav .tab { min-height: 33px; padding: 6px 10px; font-size: 12px; }
    .admin-nav-host-link { padding-inline: 10px; font-size: 11px; }
    .modal-host-card { padding: 20px 14px 18px; }
    .host-form-grid { grid-template-columns: 1fr; }
    .host-form-wide { grid-column: auto; }
    .host-card-header { align-items: flex-start; }
    .host-card-color { margin-top: 3px; }
    .host-card-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .host-card-filter-or { display: none; }
    .host-card-filter-select,
    .host-card-year-input { width: 100%; }
    .host-card-filter-submit { grid-column: 1 / -1; justify-content: center; }
    .host-card-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; }
    .host-card-limit { grid-column: 1 / -1; }
    .host-card-tabs { display: flex; width: 100%; }
    .host-card-tab { flex: 1; min-width: 0; padding-inline: 8px; }
    .host-calendar-nav { justify-content: center; }
    .host-calendar-nav > span { min-width: 120px; }
    .host-calendar-cell { min-height: 48px; padding-inline: 2px; }
    .host-card-record { align-items: flex-start; flex-wrap: wrap; }
    .host-card-inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .host-card-inline-field.is-wide { grid-column: 1 / -1; min-width: 0; }
    .host-card-footer { gap: 8px; }
    .permission-presets {
      grid-template-columns: 1fr;
    }
    .show-access-mode {
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    .show-access-short {
      min-width: 0;
    }
    .permission-summary-row {
      grid-template-columns: 1fr;
      gap: 6px;
    }
    .host-document-period { grid-template-columns: 1fr; }
    .host-document-remove { width: 100%; }
    .host-document-kind-head { align-items: flex-start; flex-direction: column; }
    .host-document-kind-actions { width: 100%; align-items: flex-start !important; flex-direction: column; }
  }
  @media (max-width: 460px) {
    .host-card-inline-form { grid-template-columns: 1fr; }
    .host-card-inline-field.is-wide { grid-column: auto; }
    .host-card-inline-form > .btn { justify-content: center; }
  }
