/* ИИ-админ — основа: цвета светлой и тёмной темы, сброс, мелкие утилиты.
   Тема в стиле Apple (27.11): светлая по умолчанию, тёмная — [data-theme="dark"] (ставит js/theme.js).
   Цвета везде только через переменные ниже. Порядок файлов стилей — в index.html. */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #fbfbfd;
  --card: #ffffff;
  --hover: rgba(0,0,0,.045);
  --line: rgba(60,60,67,.13);
  --chip: rgba(118,118,128,.12);
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --muted: #8e8e93;
  --accent: #007aff;
  --accent-light: #3395ff;
  --on-accent: #ffffff;
  --brand: #ff9f0a;
  --success: #248a3d;
  --danger: #d70015;
  --warning: #c25e00;
  --ok-dot: #34c759;
  --code-bg: #f2f2f5;
  --glass: rgba(246,246,248,.8);
  --header-bg: rgba(245,245,247,.82);
  --overlay: rgba(0,0,0,.28);
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-pop: 0 12px 40px rgba(0,0,0,.14);
  --card-border: rgba(0,0,0,.05);
  --input-bg: #ffffff;
  --active: rgba(0,0,0,.075);
  --seg-on: var(--card);            /* выбранный пункт переключателя-«таблетки» */
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161618;
  --surface: #1c1c1e;
  --card: #232325;
  --hover: color-mix(in srgb, var(--text) 6%, transparent);
  --line: color-mix(in srgb, var(--text) 9%, transparent);
  --chip: rgba(118,118,128,.24);
  --text: #f5f5f7;
  --secondary: #a1a1a6;
  --muted: #6e6e73;
  --accent: #0a84ff;
  --accent-light: #409cff;
  --on-accent: #ffffff;
  --brand: #ff9f0a;
  --success: #30d158;
  --danger: #ff453a;
  --warning: #ff9f0a;
  --ok-dot: #30d158;
  --code-bg: #141416;
  --glass: rgba(28,28,30,.82);
  --header-bg: rgba(22,22,24,.82);
  --overlay: rgba(0,0,0,.55);
  --shadow: 0 1px 0 color-mix(in srgb, var(--text) 3%, transparent) inset, 0 8px 24px rgba(0,0,0,.25);
  --shadow-pop: 0 16px 48px rgba(0,0,0,.5);
  --card-border: rgba(255,255,255,.07);
  --input-bg: rgba(118,118,128,.14);
  --active: rgba(255,255,255,.1);
  --seg-on: #5a5a5e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.icon { flex-shrink: 0; }
svg { display: block; }
.clickable { cursor: pointer; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.link { color: var(--accent); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Ожидание */
.waiting { display: flex; align-items: center; gap: 10px; color: var(--secondary); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.2s infinite; }
.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--text) 20%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,80%,100%{opacity:.3; transform:scale(.8);} 40%{opacity:1; transform:scale(1.2);} }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
