/* ============================================================
   УПРАВЛЕНКА — macOS HIG Portal Design System
   portal.css — глобальные стили, разделяемые всеми страницами
   ============================================================ */

/* === ПЕРЕМЕННЫЕ (macOS HIG палитра) === */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;

  /* Фоны */
  --bg:           #f5f5f7;
  --card-bg:      #ffffff;
  --sidebar-bg:   rgba(248,248,250,0.88);

  /* Акцент */
  --accent:       #007AFF;
  --accent-hover: #0066dd;
  --accent-light: rgba(0,122,255,0.10);

  /* Текст */
  --text-primary:   #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary:  #aeaeb2;

  /* Состояния */
  --danger:       #ff3b30;
  --danger-light: rgba(255,59,48,0.09);
  --success:      #34c759;
  --success-light:rgba(52,199,89,0.10);
  --warning:      #ff9500;
  --warning-light:rgba(255,149,0,0.10);

  /* Границы */
  --border:       rgba(0,0,0,0.08);
  --border-input: rgba(0,0,0,0.14);
  --sidebar-border: rgba(0,0,0,0.07);

  /* Скругления */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);

  /* Переходы */
  --transition: 0.15s ease;

  /* Сайдбар */
  --sidebar-w:    240px;
  --sidebar-w-sm:  64px;
}

/* === СБРОС === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === LAYOUT === */
.portal-layout {
  display: block;
  min-height: 100vh;
}

.portal-main {
  display: block;
  padding: 28px 40px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.page-container {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* === САЙДБАР === */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: width 0.24s cubic-bezier(0.4,0,0.2,1),
              min-width 0.24s cubic-bezier(0.4,0,0.2,1);
  z-index: 50;
}

.sidebar.collapsed {
  width: var(--sidebar-w-sm);
  min-width: var(--sidebar-w-sm);
}

/* Шапка сайдбара */
.sidebar-header {
  padding: 16px 12px 12px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent) 0%, #5856d6 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}

.sidebar-brand-wrap {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  transition: opacity 0.18s ease;
}

.sidebar.collapsed .sidebar-brand-wrap { opacity: 0; flex: 0; min-width: 0; overflow: hidden; }

.sidebar-brand-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-brand-org {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Кнопка свернуть */
.sidebar-toggle-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: background 0.15s, color 0.15s, transform 0.24s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-toggle-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-secondary);
}

.sidebar.collapsed .sidebar-toggle-btn { transform: rotate(180deg); }

.sidebar.collapsed .sidebar-header {
  justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
  display: none;
}

/* Навигация */
.sidebar-nav {
  flex: 1;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 10px 10px 3px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s ease, max-height 0.24s ease;
  max-height: 30px;
}

.sidebar.collapsed .nav-section-label {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.13s ease, color 0.13s ease;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  background: rgba(0,0,0,0.055);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.sub {
  padding-left: 38px;
  font-size: 12.5px;
  font-weight: 400;
}

.sidebar.collapsed .nav-item.sub { padding-left: 10px; }

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}

.nav-item.active .nav-icon { opacity: 1; }
.nav-item:hover .nav-icon  { opacity: 1; }

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .nav-label { opacity: 0; }

/* Тултипы при свёрнутом сайдбаре */
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(var(--sidebar-w-sm) - 4px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(29,29,31,0.88);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  backdrop-filter: blur(8px);
}

/* Футер сайдбара */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 9px;
  margin-bottom: 4px;
  overflow: hidden;
}

.sidebar-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #5856d6 100%);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-info {
  overflow: hidden;
  flex: 1;
  transition: opacity 0.15s ease;
}

.sidebar.collapsed .sidebar-user-info { opacity: 0; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding-left: 10px; padding-right: 10px; }

.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logout:hover { background: var(--danger-light); color: var(--danger); }

.sidebar-logout-label { transition: opacity 0.15s ease; }
.sidebar.collapsed .sidebar-logout-label { opacity: 0; }

/* === ШАПКА СТРАНИЦЫ === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === КАРТОЧКИ === */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-md);
}

.card-body   { padding: 24px; }

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* === ТАБЛИЦЫ === */
.table-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead tr {
  background: rgba(0,0,0,0.018);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}

.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: rgba(0,122,255,0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .col-actions { width: 80px; text-align: center; white-space: nowrap; }
.data-table .col-right    { text-align: right; }
.data-table .col-center   { text-align: center; }

/* === КНОПКИ === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
  letter-spacing: -0.01em;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 4px rgba(0,122,255,0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.35);
}

.btn-secondary {
  background: rgba(0,0,0,0.06);
  color: var(--text-primary);
}
.btn-secondary:hover { background: rgba(0,0,0,0.10); }

.btn-outline {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.14); }

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(255,59,48,0.18);
}
.btn-danger:hover { background: rgba(255,59,48,0.14); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }

/* Иконочные кнопки */
.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(0,0,0,0.09); color: var(--text-primary); }
.icon-btn.danger { background: var(--danger-light); color: var(--danger); }
.icon-btn.danger:hover { background: rgba(255,59,48,0.14); }

/* === ФОРМЫ === */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.form-control {
  padding: 9px 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: var(--font);
  background: white;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.form-control::placeholder { color: var(--text-tertiary); }

textarea.form-control { resize: vertical; }

.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.col-span-2  { grid-column: 1 / -1; }

/* === МОДАЛЬНЫЕ ОКНА === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

/* Для старого стиля show/hide через display:flex */
.modal-overlay[style*="flex"] { display: flex !important; }

.modal-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  width: 600px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.16);
  animation: modalIn 0.22s cubic-bezier(0.34,1.4,0.64,1);
  border: 1px solid rgba(255,255,255,0.7);
}

.modal-card-sm { width: 460px; }
.modal-card-lg { width: 680px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.modal-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(255,59,48,0.18);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 14px;
}

/* === БЕЙДЖИ === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* === ПОИСК === */
.search-wrapper {
  position: relative;
  display: inline-block;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  padding: 9px 14px 9px 34px;
  border: 1px solid rgba(0,0,0,0.11);
  border-radius: 20px;
  font-size: 13.5px;
  background: white;
  color: var(--text-primary);
  outline: none;
  width: 260px;
  transition: all var(--transition);
  font-family: var(--font);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.10);
  width: 300px;
}

/* === ФИЛЬТР-ПИЛЮЛИ === */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.filter-pill:hover:not(.active) {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.14);
}

/* === АЛЕРТЫ === */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
}
.alert-error   { background: var(--danger-light);  color: var(--danger);  border: 1px solid rgba(255,59,48,0.18); }
.alert-warning { background: var(--warning-light); color: #9a5c00;        border: 1px solid rgba(255,149,0,0.22); }
.alert-success { background: var(--success-light); color: #1a7040;        border: 1px solid rgba(52,199,89,0.22); }

/* === НАВИГАЦИЯ НАЗАД === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* === ПУСТОЕ СОСТОЯНИЕ === */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* === УНИВЕРСАЛЬНЫЙ ПЕРЕКЛЮЧАТЕЛЬ (slider) ===
   Использование:
     <label class="toggle-switch">
       <input type="checkbox" ...>
       <span class="toggle-switch-slider"></span>
       <span class="toggle-switch-text">Подпись</span>
     </label>
   Вариации цвета: добавить класс `toggle-switch--accent` (синий, по умолчанию)
                   или `toggle-switch--orange` (оранжевый, как «По документам»)
*/
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-switch-slider {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    background: rgba(0,0,0,0.18);
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.18s ease;
}
.toggle-switch-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.18s ease;
}
.toggle-switch input:checked + .toggle-switch-slider::before { transform: translateX(14px); }
.toggle-switch-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.18s ease;
}
/* Цветовые варианты */
.toggle-switch--accent input:checked + .toggle-switch-slider { background: var(--accent); }
.toggle-switch--accent input:checked ~ .toggle-switch-text  { color: var(--accent); }
.toggle-switch--orange input:checked + .toggle-switch-slider { background: #ff9500; }
.toggle-switch--orange input:checked ~ .toggle-switch-text  { color: #ff9500; }
.toggle-switch--green  input:checked + .toggle-switch-slider { background: #34c759; }
.toggle-switch--green  input:checked ~ .toggle-switch-text  { color: #34c759; }
.toggle-switch input:disabled + .toggle-switch-slider { opacity: 0.4; cursor: not-allowed; }

/* Компактный размер для строк таблицы */
.toggle-switch--sm .toggle-switch-slider { width: 28px; height: 16px; }
.toggle-switch--sm .toggle-switch-slider::before { width: 12px; height: 12px; }
.toggle-switch--sm input:checked + .toggle-switch-slider::before { transform: translateX(12px); }


/* === УТИЛИТЫ === */
.text-accent     { color: var(--accent); }
.text-danger     { color: var(--danger); }
.text-success    { color: var(--success); }
.text-warning    { color: var(--warning); }
.text-secondary  { color: var(--text-secondary); }
.text-muted      { color: var(--text-tertiary); }
.text-mono       { font-family: 'SF Mono','JetBrains Mono','Fira Code',monospace; font-size: 0.9em; }
.text-right      { text-align: right; }
.text-center     { text-align: center; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.flex-end     { display: flex; justify-content: flex-end; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ─── Toast (уведомление справа сверху, macOS-style glass) ───────────────── */
.toast-flash {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 240px;
    max-width: 380px;
    padding: 12px 16px 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.10);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 10000;
    opacity: 0;
    transform: translateX(16px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-flash.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-flash::before {
    content: "";
    flex: 0 0 4px;
    align-self: stretch;
    border-radius: 4px;
    background: var(--text-secondary);
}
.toast-success::before { background: #34c759; }
.toast-error::before   { background: #ff3b30; }
.toast-info::before    { background: #007aff; }
