/* ============================================================
   PULSE-THEME26-V1 — "soft editorial luxury on Pulse indigo"
   Full visual revamp, REVERSIBLE: every rule gated on html.t26
   (class set from the `theme26` Settings row — flip it to "0"
   and the old design returns instantly, no deploy).

   Design language (from the approved references, on purpose):
   editorial whitespace + tight display headings   [LUXURA]
   indigo→lavender gradients, dark-ink stat panels [BloomFi]
   chip metadata + rounded card clusters           [workspace refs]
   large radii 14–20px, pill controls, one accent  [all four]

   SPEED RULES: no fonts, no images, no JS. Transitions are
   transform/opacity/color only (no `all`). backdrop-filter is
   allowed ONLY on overlay chrome (dropdown, modal, chatbot),
   never on cards inside scrolling lists.
   ============================================================ */

/* ── 1. Tokens ──────────────────────────────────────────────── */
html.t26 {
  --bg: #f3f4f9;
  --border: #e8eaf2;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 10px 28px -14px rgba(30, 34, 90, .10);
  --t26-r-lg: 18px;        /* cards, panels        */
  --t26-r-md: 13px;        /* inner cards, inputs  */
  --t26-r-pill: 999px;     /* buttons, chips       */
  --t26-ink: #191c33;      /* dark-ink panel base  */
  --t26-ink-2: #23264a;
  --t26-accent-soft: #ecebfd;
  --t26-grad: linear-gradient(135deg, #5b49e0 0%, #6d5efc 55%, #8f7bff 100%);
  --t26-glass: rgba(255, 255, 255, .78);
  --t26-glass-border: rgba(255, 255, 255, .55);
}
html.t26[data-theme="dark"] {
  --bg: #0e1017;
  --border: #262a3a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .5);
  --t26-accent-soft: #232040;
  --t26-glass: rgba(23, 25, 36, .82);
  --t26-glass-border: rgba(255, 255, 255, .08);
}

/* ── 2. Typography: editorial hierarchy ─────────────────────── */
html.t26 .page-head h1 {
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 700;
}
html.t26 h2 { letter-spacing: -0.015em; }
html.t26 h3 { letter-spacing: -0.01em; }
html.t26 .crumbs {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  opacity: .75;
}
html.t26 .page-head .muted { font-size: 13.5px; }
html.t26 body { font-variant-numeric: tabular-nums; }

/* ── 3. Cards: the soft-panel grammar ───────────────────────── */
html.t26 .card,
html.t26 .kpi,
html.t26 .perf-card,
html.t26 .contacts-card,
html.t26 .opp-card-new,
html.t26 .att-card,
html.t26 .sm-kpi,
html.t26 .email-folders,
html.t26 .email-list-card,
html.t26 .auth-card,
html.t26 .pagination-bar {
  border-radius: var(--t26-r-lg);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
html.t26 .card { padding: 22px; }
html.t26 .card-head { margin-bottom: 18px; }
/* inner / nested cards sit one radius step down */
html.t26 .card .card,
html.t26 .contact-row,
html.t26 .reminder-toast { border-radius: var(--t26-r-md); }

/* ── 4. Buttons: pills, gradient primary ────────────────────── */
html.t26 .btn {
  border-radius: var(--t26-r-pill);
  padding: 9px 18px;
  font-weight: 600;
  transition: background-color 150ms ease, border-color 150ms ease,
              color 150ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
html.t26 .btn.small { padding: 6px 13px; }
html.t26 .btn-primary {
  background: var(--t26-grad);
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(91, 73, 224, .55);
}
html.t26 .btn-primary:hover { background: var(--t26-grad); filter: brightness(1.06); }
html.t26 .btn:active { transform: scale(0.97); }
html.t26 .btn:focus-visible,
html.t26 input:focus-visible,
html.t26 select:focus-visible,
html.t26 textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── 5. Inputs ──────────────────────────────────────────────── */
html.t26 input[type="text"], html.t26 input[type="email"],
html.t26 input[type="password"], html.t26 input[type="number"],
html.t26 input[type="search"], html.t26 input[type="tel"],
html.t26 input[type="date"], html.t26 input[type="datetime-local"],
html.t26 input[type="time"], html.t26 select, html.t26 textarea {
  border-radius: var(--t26-r-md);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
html.t26 input:focus, html.t26 select:focus, html.t26 textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--t26-accent-soft);
}

/* ── 6. Chips / pills / badges: metadata wears a pill ───────── */
html.t26 .pill, html.t26 [class*="status-pill"], html.t26 [class*="tag-pill"],
html.t26 .stage-badge, html.t26 .role-badge, html.t26 .source-badge {
  border-radius: var(--t26-r-pill);
  font-weight: 600;
  letter-spacing: 0.01em;
}
html.t26 .flash {
  border-radius: var(--t26-r-md);
  border: 1px solid transparent;
  font-weight: 500;
}

/* ── 7. Tables: airier, editorial headers ───────────────────── */
html.t26 .table th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 12px;
}
html.t26 .table td { padding: 12px; }
html.t26 .table tbody tr { transition: background-color 120ms ease; }
html.t26 .table tbody tr:hover { background: var(--t26-accent-soft); }
html.t26[data-theme="dark"] .table tbody tr:hover { background: rgba(139, 131, 255, .08); }

/* ── 8. Sidebar: dark chrome, pill navigation ───────────────── */
html.t26 aside.sidebar .nav-item {
  border-radius: var(--t26-r-md);
  margin: 1px 6px;
  transition: background-color 140ms ease, color 140ms ease;
}
html.t26 aside.sidebar .nav-item:hover { background: rgba(255, 255, 255, .07); }
html.t26 aside.sidebar .nav-item.active,
html.t26 aside.sidebar .nav-item[aria-current] {
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
html.t26 aside.sidebar .nav-section,
html.t26 aside.sidebar .nav-group-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: .6;
}

/* ── 9. Stat numbers: BloomFi-style presence ────────────────── */
html.t26 .kpi b, html.t26 .kpi strong, html.t26 .kpi .kpi-value,
html.t26 .sm-kpi b, html.t26 .sm-kpi strong {
  font-size: 1.35em;
  letter-spacing: -0.02em;
}

/* ── 10. Overlay chrome: the ONLY glass surfaces ────────────── */
html.t26 .notif-dropdown {
  background: var(--t26-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--t26-glass-border);
  border-radius: var(--t26-r-lg);
  box-shadow: 0 24px 60px -18px rgba(20, 24, 70, .35);
}
html.t26 .modal-content {
  background: var(--t26-glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--t26-glass-border);
  border-radius: var(--t26-r-lg);
}
html.t26 .modal-backdrop { background: rgba(13, 16, 38, .45); }
html.t26 .chatbot-panel {
  border-radius: var(--t26-r-lg);
  border: 1px solid var(--t26-glass-border);
}

/* ── 11. App-mode harmony (rides the same tokens) ───────────── */
html.t26.pulse-app .pulse-sheet { border-radius: 22px 22px 0 0; }
html.t26.pulse-app .pulse-fab {
  background: var(--t26-grad);
  box-shadow: 0 10px 24px -8px rgba(109, 94, 252, .7);
}

/* ── 12. Accessibility fallbacks ────────────────────────────── */
@media (prefers-reduced-transparency: reduce) {
  html.t26 .notif-dropdown, html.t26 .modal-content {
    background: var(--surface);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  html.t26 .card, html.t26 .kpi, html.t26 .notif-dropdown, html.t26 .modal-content {
    border-color: var(--muted);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.t26 .btn:active { transform: none; }
}
