/* Фатаи — панель продукта · светлая тема */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --adm-bg: #f4f7fb;
  --adm-bg-soft: #eef3f8;
  --adm-surface: #ffffff;
  --adm-surface-2: #f8fafc;
  --adm-border: #e2e8f0;
  --adm-border-soft: #f1f5f9;
  --adm-text: #0f172a;
  --adm-text-secondary: #334155;
  --adm-muted: #64748b;
  --adm-accent: #0ea5c9;
  --adm-accent-dark: #0891b2;
  --adm-accent-soft: #e0f2fe;
  --adm-good: #16a34a;
  --adm-good-soft: #dcfce7;
  --adm-bad: #dc2626;
  --adm-bad-soft: #fee2e2;
  --adm-warn: #d97706;
  --adm-warn-soft: #fef3c7;
  --adm-gradient: linear-gradient(135deg, #0ea5c9 0%, #14b8a6 100%);
  --adm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --adm-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --adm-radius: 16px;
  --adm-radius-sm: 12px;
  --adm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --adm-header-h: 64px;
  --adm-max: 1120px;
}

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

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--adm-font);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(14, 165, 201, 0.08), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(20, 184, 166, 0.06), transparent 50%),
    var(--adm-bg);
  color: var(--adm-text);
  min-height: 100vh;
  line-height: 1.45;
}

a { color: var(--adm-accent-dark); }
a:hover { color: var(--adm-accent); }

/* ── Header ── */
.adm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--adm-header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow-sm);
}

.adm-header-inner {
  max-width: var(--adm-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.adm-brand:hover { color: inherit; text-decoration: none; }

.adm-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(14, 165, 201, 0.22);
}

.adm-brand-text { min-width: 0; }

.adm-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--adm-text);
  line-height: 1.15;
}

.adm-brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--adm-muted);
  margin-top: 1px;
}

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

.adm-header-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.adm-header-link:hover {
  color: var(--adm-accent-dark);
  background: var(--adm-accent-soft);
  border-color: rgba(14, 165, 201, 0.2);
}

.container {
  max-width: var(--adm-max);
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.need-auth {
  padding: 64px 24px;
  text-align: center;
  color: var(--adm-muted);
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow-sm);
}

.need-auth a { color: var(--adm-accent-dark); font-weight: 600; }

h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--adm-text);
}

.page-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-title h1 { margin-bottom: 0; }

.page-title-hint {
  font-size: 13px;
  color: var(--adm-muted);
  font-weight: 500;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 6px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  box-shadow: var(--adm-shadow-sm);
}

.tab {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--adm-muted);
  font-weight: 600;
  font-size: 12px;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  user-select: none;
}

.tab:hover {
  color: var(--adm-text-secondary);
  background: var(--adm-bg-soft);
}

.tab.active {
  background: var(--adm-accent-soft);
  border-color: rgba(14, 165, 201, 0.35);
  color: var(--adm-accent-dark);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 201, 0.08);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--adm-bad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.tab-badge[hidden] { display: none !important; }

/* ── Cards & surfaces ── */
.card {
  background: var(--adm-surface);
  border-radius: var(--adm-radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow-sm);
}

.card h2 {
  font-size: 12px;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  font-weight: 700;
}

.muted { color: var(--adm-muted); font-size: 13px; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.health-card,
.pulse-block,
.ret-card,
.stat,
.funnel-step,
.cohort-card,
.journal-pair,
.support-msg-card {
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius-sm);
}

.health-card { padding: 14px; text-align: center; }
.health-emoji { font-size: 20px; margin-bottom: 6px; }
.health-val,
.funnel-count,
.ret-val,
.stat-val,
.pulse-num,
.feature-pct,
.msg-count,
.cohort-row strong,
.live-type,
.live-journey-head {
  color: var(--adm-accent-dark);
}

.health-val { font-size: 22px; font-weight: 800; line-height: 1.2; }
.health-lbl,
.ret-lbl,
.stat-lbl,
.pulse-q,
.profit-cell .lbl {
  font-size: 11px;
  color: var(--adm-muted);
  margin-top: 4px;
}

.funnel-step { text-align: center; padding: 12px; margin: 4px 0; }
.funnel-count { font-size: 28px; font-weight: 800; }
.funnel-label { font-size: 13px; color: var(--adm-text-secondary); margin-top: 4px; }
.funnel-arrow { text-align: center; color: var(--adm-muted); padding: 4px; font-size: 13px; }
.funnel-conv { color: var(--adm-warn); font-weight: 700; }

.reg-row {
  display: grid;
  grid-template-columns: 52px 100px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
}

.reg-left .reg-name { color: var(--adm-bad); }
.reg-active .reg-name { color: var(--adm-good); }
.reg-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; color: var(--adm-muted); font-size: 11px; }
.step-node { padding: 2px 6px; border-radius: 6px; background: var(--adm-bg-soft); border: 1px solid var(--adm-border); }
.step-done { color: var(--adm-good); border-color: rgba(22, 163, 74, 0.35); background: var(--adm-good-soft); }
.step-pending { opacity: .5; }
.step-arrow { color: var(--adm-muted); margin: 0 2px; }

.feature-row { display: grid; grid-template-columns: 100px 1fr 48px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.feature-bar { height: 8px; background: var(--adm-bg-soft); border-radius: 4px; overflow: hidden; border: 1px solid var(--adm-border-soft); }
.feature-fill { height: 100%; background: var(--adm-gradient); }
.feature-pct { text-align: right; font-weight: 700; }

.msg-row {
  display: grid;
  grid-template-columns: 28px 1fr 56px;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
}

.msg-count { text-align: right; font-weight: 700; }

.journal-pair { margin-bottom: 14px; padding: 12px; font-size: 13px; }
.journal-user { margin-bottom: 8px; color: var(--adm-text); }
.journal-ai { color: var(--adm-text-secondary); margin-bottom: 6px; white-space: pre-wrap; }
.journal-meta { font-size: 11px; color: var(--adm-muted); }

.ret-card, .stat { border-radius: var(--adm-radius-sm); padding: 16px; text-align: center; }
.ret-val, .stat-val { font-size: 26px; font-weight: 800; }
.retention-grid, .errors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.errors-grid { grid-template-columns: repeat(5, 1fr); }

.churn-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
}
.churn-row strong { color: var(--adm-bad); min-width: 40px; }

.bar-chart { display: flex; gap: 4px; align-items: flex-end; height: 100px; margin-top: 12px; }
.bar-wrap { flex: 1; text-align: center; }
.bar { background: var(--adm-accent); border-radius: 4px 4px 0 0; min-height: 2px; margin: 0 auto; width: 80%; }
.bar-lbl { font-size: 9px; color: var(--adm-muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--adm-border-soft); }
th {
  color: var(--adm-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  background: var(--adm-surface-2);
}
td { color: var(--adm-text-secondary); }
tr:hover td { background: rgba(14, 165, 201, 0.03); }

/* ── Buttons ── */
.btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 201, 0.3);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  background: var(--adm-surface);
  color: var(--adm-accent-dark);
  font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--adm-accent-soft); border-color: var(--adm-accent); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-primary {
  background: var(--adm-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(14, 165, 201, 0.25);
}
.btn-primary:hover { filter: brightness(1.03); }
.btn-danger {
  background: var(--adm-bad-soft);
  color: var(--adm-bad);
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.btn-danger:hover { background: #fecaca; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--adm-surface);
  border-radius: 20px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow);
}
.modal h3 { margin-bottom: 14px; font-size: 18px; font-weight: 800; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: var(--adm-muted); margin-bottom: 4px; font-weight: 600; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input:not([type="checkbox"]) {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  color: var(--adm-text);
  font-family: inherit;
  font-size: 14px;
}
.form-group input:focus {
  outline: none;
  border-color: var(--adm-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 201, 0.15);
}

.crm-card h3 { margin-bottom: 12px; font-size: 16px; font-weight: 800; }
.crm-card p { font-size: 13px; color: var(--adm-muted); margin-bottom: 6px; }
.loading { text-align: center; padding: 30px; color: var(--adm-muted); }

.pulse-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pulse-block { padding: 18px; }
.pulse-q {
  font-size: 11px;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: .04px;
  margin-bottom: 10px;
  font-weight: 700;
}
.pulse-num { font-size: 34px; font-weight: 800; line-height: 1.1; }
.pulse-sub { font-size: 12px; color: var(--adm-text-secondary); margin-top: 6px; }
.pulse-bad .pulse-num { color: var(--adm-bad); }
.pulse-good .pulse-num { color: var(--adm-good); }

.cohort-card { padding: 16px; margin-bottom: 12px; }
.cohort-title { font-size: 18px; font-weight: 800; color: var(--adm-text); margin-bottom: 10px; }
.cohort-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--adm-muted);
}
.cohort-row strong { font-weight: 700; }

.live-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
  align-items: start;
}
.live-time { color: var(--adm-muted); font-size: 12px; }
.live-text { color: var(--adm-text); }
.live-type { font-size: 10px; text-transform: uppercase; font-weight: 700; }

.heatmap-row { display: grid; grid-template-columns: 28px 1fr 40px; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.heatmap-bar { height: 10px; background: var(--adm-bg-soft); border-radius: 4px; overflow: hidden; }
.heatmap-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 4px; }

.neg-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 72px);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
  align-items: center;
}
.neg-bad { color: var(--adm-bad); font-weight: 800; }

.pay-row {
  display: grid;
  grid-template-columns: 1fr 80px 60px auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
  align-items: center;
}

.utm-table-wrap { overflow-x: auto; }
.utm-table-wrap table { font-size: 11px; min-width: 960px; }
.utm-table-wrap th, .utm-table-wrap td { padding: 8px 6px; white-space: nowrap; }
.utm-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.utm-filters .btn.active { background: var(--adm-accent-soft); border-color: var(--adm-accent); color: var(--adm-accent-dark); }
.utm-gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.utm-gen-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.utm-gen-out {
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  word-break: break-all;
  color: var(--adm-accent-dark);
  margin: 12px 0;
  min-height: 44px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.utm-gen-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.utm-toast { font-size: 12px; color: var(--adm-good); opacity: 0; transition: opacity .2s; }
.utm-toast.show { opacity: 1; }
.pay-table { margin-top: 16px; }
.pay-stat-emoji { font-size: 18px; margin-bottom: 4px; }

.alert-banner {
  background: var(--adm-warn-soft);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #92400e;
}
.alert-banner.critical {
  background: var(--adm-bad-soft);
  border-color: rgba(220, 38, 38, 0.3);
  color: #991b1b;
}
.alert-item { padding: 4px 0; }

.profit-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-border);
}
.profit-box.profit-good { border-color: rgba(22, 163, 74, 0.35); background: #f0fdf4; }
.profit-box.profit-bad { border-color: rgba(220, 38, 38, 0.35); background: #fef2f2; }

.crm-ai-days,
.crm-today,
.crm-sub {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-border);
}
.crm-ai-days-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin: 0 0 10px;
}
.crm-ai-day-row {
  display: grid;
  grid-template-columns: 52px 70px minmax(90px, 1fr) minmax(110px, 1.2fr);
  gap: 8px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
}
.crm-ai-day-row:last-child { border-bottom: none; }
.crm-ai-day-date { color: var(--adm-text-secondary); font-variant-numeric: tabular-nums; font-weight: 600; }
.crm-ai-day-rub { color: var(--adm-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-ai-day-msgs,
.crm-ai-day-usd { color: var(--adm-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.crm-ai-day-usd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.crm-today-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.crm-today-cell .lbl { font-size: 11px; color: var(--adm-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.crm-today-cell .val { font-size: 16px; font-weight: 700; color: var(--adm-text); margin-top: 4px; font-variant-numeric: tabular-nums; }

.crm-sub-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
  color: var(--adm-muted);
}
.crm-sub-row:last-child { border-bottom: none; }
.crm-sub-row strong { color: var(--adm-text); font-weight: 700; text-align: right; }
.crm-sub-remain { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--adm-border); border-bottom: none; }
.crm-sub-ok { color: var(--adm-good) !important; }
.crm-sub-neg { color: var(--adm-bad) !important; }
.crm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.eval-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.eval-controls label { font-size: 13px; color: var(--adm-muted); display: flex; gap: 6px; align-items: center; }
.eval-controls input {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  color: var(--adm-text);
  border-radius: 8px;
  padding: 6px 8px;
  font-family: inherit;
}
.eval-run-row {
  display: grid;
  grid-template-columns: 64px 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
  font-size: 13px;
  cursor: pointer;
}
.eval-run-row:hover { background: rgba(14, 165, 201, 0.04); }
.eval-run-row.active { background: var(--adm-accent-soft); }
.eval-user-card {
  margin: 12px 0;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--adm-surface);
}
.eval-user-head {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.eval-user-head:hover { background: var(--adm-surface-2); }
.eval-user-body { display: none; padding: 0 14px 14px; border-top: 1px solid var(--adm-border-soft); }
.eval-user-card.open .eval-user-body { display: block; }
.eval-turn {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.eval-turn.user {
  background: var(--adm-accent-soft);
  color: var(--adm-text);
  border: 1px solid rgba(14, 165, 201, 0.2);
}
.eval-turn.bot {
  background: var(--adm-surface-2);
  color: var(--adm-text-secondary);
  border: 1px solid var(--adm-border);
}
.eval-turn .who {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: 4px;
}
.eval-card { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.eval-card.food { background: #fffbeb; color: #b45309; border: 1px solid rgba(245, 158, 11, 0.3); }
.eval-card.activity { background: #ecfdf5; color: #047857; border: 1px solid rgba(16, 185, 129, 0.3); }
.eval-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--adm-bg-soft);
  color: var(--adm-text-secondary);
  border: 1px solid var(--adm-border);
}
.eval-badge.ok { background: var(--adm-good-soft); color: var(--adm-good); border-color: rgba(22, 163, 74, 0.25); }
.eval-badge.error { background: var(--adm-bad-soft); color: var(--adm-bad); border-color: rgba(220, 38, 38, 0.25); }
.eval-badge.running { background: var(--adm-accent-soft); color: var(--adm-accent-dark); border-color: rgba(14, 165, 201, 0.25); }

.profit-cell { text-align: center; }
.profit-cell .val { font-size: 18px; font-weight: 800; margin-top: 4px; color: var(--adm-text); }
.profit-badge { font-size: 11px; font-weight: 700; }
.profit-badge.ok { color: var(--adm-good); }
.profit-badge.bad { color: var(--adm-bad); }

.live-terminal {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px;
  background: var(--adm-surface-2);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
}
.live-journey { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px dashed var(--adm-border); }
.live-journey-head { font-weight: 700; margin-bottom: 8px; font-size: 12px; }
.live-step { padding: 2px 0; color: var(--adm-text-secondary); }
.live-step .live-time { color: var(--adm-muted); min-width: 44px; display: inline-block; }
.live-chain-arrow { color: var(--adm-muted); padding: 2px 0 2px 44px; }

.quote-block {
  background: var(--adm-accent-soft);
  border-left: 3px solid var(--adm-accent);
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: var(--adm-text-secondary);
}

.status-ok { color: var(--adm-good); }
.status-bad { color: var(--adm-bad); }
.status-wait { color: var(--adm-warn); }

.support-msg-card { margin-bottom: 14px; padding: 14px; font-size: 13px; }
.support-msg-card.is-new {
  border-color: rgba(14, 165, 201, 0.4);
  box-shadow: 0 0 0 3px rgba(14, 165, 201, 0.08);
}
.support-msg-preview {
  color: var(--adm-text);
  white-space: pre-wrap;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-height: 4.4em;
}
.support-msg-card.is-open .support-msg-preview {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}
.support-msg-toggle {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--adm-accent-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.support-msg-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.blocked-badge {
  display: inline-block;
  background: var(--adm-bad-soft);
  color: var(--adm-bad);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
}
tr.row-blocked td { opacity: .65; }

@media (max-width: 640px) {
  .adm-brand-sub { display: none; }
  .adm-header-link { padding: 8px 10px; }
  .retention-grid, .errors-grid { grid-template-columns: repeat(2, 1fr); }
  .reg-row, .pulse-grid { grid-template-columns: 1fr; }
  .neg-row { grid-template-columns: 1fr; }
  .profit-box { grid-template-columns: repeat(2, 1fr); }
  .crm-today-grid { grid-template-columns: 1fr; }
}
