/* =========================================================================
   SIGA BOT AGENTES — Sistema de diseño 2026
   Inspirado en Handle, Linear, Vercel. Cream base + charcoal + violet accent.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Paleta cream */
  --cream-50:  #fbf9f4;
  --cream-100: #f6f2ea;
  --cream-200: #ebe5d7;
  --cream-300: #ddd4c0;
  --cream-400: #bfb49a;

  /* Neutros oscuros */
  --ink-950: #0b0b0c;
  --ink-900: #131315;
  --ink-800: #1c1c1f;
  --ink-700: #28282c;
  --ink-600: #3c3c42;
  --ink-500: #5a5a62;
  --ink-400: #80808a;
  --ink-300: #a8a8b0;
  --ink-200: #d0d0d4;
  --ink-100: #e8e8ea;

  /* Acentos */
  --violet-600: #5b42ff;
  --violet-500: #7b6cff;
  --violet-400: #9c91ff;
  --violet-100: #ebe7ff;
  --violet-50:  #f4f2ff;

  --emerald-600: #0f9d58;
  --emerald-500: #22c55e;
  --emerald-100: #d6f5e3;

  --amber-500:  #f59e0b;
  --amber-100:  #fef3c7;

  --rose-500:   #f43f5e;
  --rose-100:   #ffe4e6;

  --sky-500:    #0ea5e9;
  --sky-100:    #dbeafe;

  /* Semánticos (light mode default) */
  --bg:          var(--cream-50);
  --bg-page:     var(--cream-100);
  --bg-elev:     #ffffff;
  --bg-subtle:   var(--cream-200);
  --bg-hover:    var(--cream-200);
  --bg-inverse:  var(--ink-950);

  --border:         #ebe3d2;
  --border-strong:  #d6cdb8;
  --border-focus:   var(--violet-500);

  --text:        var(--ink-950);
  --text-2:      var(--ink-600);
  --text-muted:  var(--ink-400);
  --text-dim:    var(--ink-300);
  --text-on-dark:#ffffff;

  --primary:         var(--ink-950);
  --primary-hover:   #000;
  --primary-contrast:#ffffff;

  --accent:       var(--violet-500);
  --accent-hover: var(--violet-600);
  --accent-soft:  var(--violet-100);

  /* Estados */
  --success:      var(--emerald-600);
  --success-soft: var(--emerald-100);
  --warning:      var(--amber-500);
  --warning-soft: var(--amber-100);
  --danger:       var(--rose-500);
  --danger-soft:  var(--rose-100);
  --info:         var(--sky-500);
  --info-soft:    var(--sky-100);

  /* Radios */
  --r-xs:  6px;
  --r-sm:  10px;
  --r:     14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-2xl: 36px;
  --r-pill:999px;

  /* Sombras */
  --sh-xs: 0 1px 2px rgba(20, 16, 10, .05);
  --sh-sm: 0 1px 3px rgba(20, 16, 10, .06), 0 1px 2px rgba(20,16,10,.04);
  --sh:    0 6px 18px rgba(20, 16, 10, .06), 0 2px 6px rgba(20,16,10,.04);
  --sh-md: 0 12px 30px rgba(20, 16, 10, .08), 0 4px 10px rgba(20,16,10,.04);
  --sh-lg: 0 24px 60px rgba(20, 16, 10, .12), 0 8px 20px rgba(20,16,10,.06);
  --sh-ring: 0 0 0 4px rgba(123, 108, 255, .18);
  --sh-glow: 0 10px 40px -10px rgba(123, 108, 255, .45);

  /* Tipografía */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Layout */
  --sidebar-w: 264px;
  --topbar-h:  64px;
  --container: 1200px;

  /* Gradientes */
  --grad-violet: linear-gradient(135deg, #8b7bff 0%, #5b42ff 60%, #3a1fff 100%);
  --grad-cream:  radial-gradient(1200px 800px at 10% 0%, #fff5dc 0%, transparent 60%),
                 radial-gradient(800px 600px at 90% 20%, #f0e8ff 0%, transparent 60%),
                 var(--cream-50);
  --grad-dark:   linear-gradient(180deg, #0b0b0c 0%, #17161c 100%);

  /* Transiciones */
  --t-fast: 120ms cubic-bezier(.2,.8,.2,1);
  --t:      200ms cubic-bezier(.2,.8,.2,1);
  --t-slow: 380ms cubic-bezier(.2,.8,.2,1);
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --bg:          var(--ink-950);
  --bg-page:     var(--ink-900);
  --bg-elev:     var(--ink-800);
  --bg-subtle:   var(--ink-800);
  --bg-hover:    var(--ink-700);

  --border:         #26262b;
  --border-strong:  #3a3a42;

  --text:        #f6f5f2;
  --text-2:      #c8c7c2;
  --text-muted:  #80808a;
  --text-dim:    #55555b;

  --primary:         #ffffff;
  --primary-hover:   #f0f0f0;
  --primary-contrast:#0b0b0c;

  --grad-cream: radial-gradient(1000px 700px at 10% 0%, rgba(123,108,255,.18) 0%, transparent 60%),
                radial-gradient(800px 600px at 90% 20%, rgba(91,66,255,.12) 0%, transparent 60%),
                var(--ink-950);
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

::selection { background: var(--accent-soft); color: var(--text); }

a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a.link:hover { color: var(--accent-hover); }

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Tipografía utilitaria ---------- */
.serif    { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }
.mono     { font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }

.display-xl { font-family: var(--font-serif); font-size: clamp(44px, 6.2vw, 92px); line-height: .98; letter-spacing: -.025em; }
.display-lg { font-family: var(--font-serif); font-size: clamp(34px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.02em; }
.display    { font-family: var(--font-serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -.015em; }
.h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: 18px; color: var(--text-2); line-height: 1.55; max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; color: var(--text-2); }
.kbd {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 18px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 14px; letter-spacing: -.005em;
  line-height: 1; border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t), color var(--t), box-shadow var(--t), border-color var(--t);
  user-select: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--sh-ring); }

.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--sh-md); }

.btn-accent { background: var(--grad-violet); color: #fff; box-shadow: var(--sh-glow); }
.btn-accent:hover { filter: brightness(1.05); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-elev); color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--ink-600); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-hover); }

.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); background: var(--bg-hover); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 26px; font-size: 15px; }
.btn-xl { padding: 18px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; border-radius: 50%; }

/* ---------- Form controls ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px; font-weight: 500; color: var(--text-2);
  display: flex; justify-content: space-between;
}
.field .hint { font-size: 12px; color: var(--text-muted); }
.field .hint-error { font-size: 12px; color: var(--danger); }

.input, .textarea, .select {
  width: 100%; padding: 13px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-size: 14px; line-height: 1.4;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--border-focus); box-shadow: var(--sh-ring);
}
.textarea { min-height: 110px; resize: vertical; }

.field-with-icon { position: relative; }
.field-with-icon .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.field-with-icon .input { padding-left: 42px; }

.form-error {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--danger-soft); color: #8a1a2a;
  font-size: 13px; border: 1px solid rgba(244,63,94,.2);
}

.switch {
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  position: relative; cursor: pointer;
  transition: background var(--t);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-sm);
  transition: transform var(--t);
}
.switch.is-on { background: var(--accent); border-color: var(--accent); }
.switch.is-on::after { transform: translateX(18px); }

/* ---------- Badges / chips / tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--bg-subtle); color: var(--text-2);
  border: 1px solid var(--border);
}
.badge-success { background: var(--success-soft); color: #045c2e; border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: #7a4100; border-color: transparent; }
.badge-danger  { background: var(--danger-soft);  color: #8a1a2a; border-color: transparent; }
.badge-info    { background: var(--info-soft);    color: #0a456b; border-color: transparent; }
.badge-accent  { background: var(--accent-soft);  color: var(--violet-600); border-color: transparent; }
.badge-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* Chip = badge más grande, clickable */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-2);
  transition: all var(--t);
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.card:hover { border-color: var(--border-strong); }
.card.interactive:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title  { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -.005em; }
.card-sub    { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.card-foot   { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

.card-elev { box-shadow: var(--sh); }
.card-flat { border: 1px solid var(--border); box-shadow: none; }

/* Glass card para hero */
.card-glass {
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}
[data-theme="dark"] .card-glass {
  background: rgba(28,28,31,.6);
  border-color: rgba(255,255,255,.08);
}

/* ---------- Stat card ---------- */
.stat {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 22px 20px;
  position: relative; overflow: hidden;
  transition: all var(--t);
}
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--sh); }
.stat .stat-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted);
}
.stat .stat-value {
  font-family: var(--font-serif); font-size: 40px; line-height: 1;
  letter-spacing: -.02em; margin: 10px 0 6px;
}
.stat .stat-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--r-pill);
}
.stat .stat-delta.up   { background: var(--success-soft); color: #045c2e; }
.stat .stat-delta.down { background: var(--danger-soft);  color: #8a1a2a; }
.stat .stat-spark {
  position: absolute; right: 0; bottom: 0; width: 120px; height: 50px;
  opacity: .9; pointer-events: none;
}
.stat.stat-accent::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-violet);
}

/* ---------- Bento grid ---------- */
.bento { display: grid; gap: 18px; }
.bento.cols-4 { grid-template-columns: repeat(4, 1fr); }
.bento.cols-3 { grid-template-columns: repeat(3, 1fr); }
.bento.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bento .span-2 { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .row-2  { grid-row: span 2; }

@media (max-width: 960px) {
  .bento.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .bento.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .bento .span-2, .bento .span-3 { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento.cols-4, .bento.cols-3, .bento.cols-2 { grid-template-columns: 1fr; }
  .bento .span-2, .bento .span-3 { grid-column: span 1; }
}

/* Bento: sin esto, una celda con contenido largo (keys, URLs) ensancha todo el layout */
.bento > .card {
  min-width: 0;
}

/* Integraciones — tarjetas IA / correo: cabecera flexible y preview de API key */
.int-card {
  min-width: 0;
  max-width: 100%;
}
.int-card .int-header {
  min-width: 0;
  align-items: flex-start;
}
.int-card .int-header > div:not(.int-logo) {
  min-width: 0;
  flex: 1;
}
.int-card .int-header h3 {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.int-card .int-status {
  min-width: 0;
}
.int-card .int-status code,
.int-status code {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.45;
  padding: 6px 8px;
  margin-top: 4px;
  background: var(--bg);
  border-radius: var(--r);
  border: 1px solid var(--border);
}
.int-card .int-actions {
  flex-wrap: wrap;
  min-width: 0;
}

/* ---------- Tablas ---------- */
.table-wrap {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td {
  padding: 14px 18px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 600;
  background: var(--bg-subtle);
}
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Layout principal (app shell) ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--grad-cream);
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad-violet);
  color: #fff; font-weight: 800; font-size: 18px;
  display: grid; place-items: center;
  box-shadow: var(--sh-glow);
}
.brand-mark.lg { width: 56px; height: 56px; font-size: 26px; border-radius: 16px; }
.brand-name { font-family: var(--font-serif); font-size: 20px; line-height: 1; letter-spacing: -.01em; }
.brand-tag  { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: .02em; }

.nav { display: flex; flex-direction: column; gap: 18px; flex: 1; overflow-y: auto; padding: 0 4px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section-title {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); padding: 0 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text-2); font-weight: 500;
  transition: all var(--t-fast); position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.is-active {
  background: var(--text); color: var(--bg);
  box-shadow: var(--sh-sm);
}
.nav-item.is-active .nav-icon { color: inherit; }
.nav-icon {
  width: 18px; height: 18px; display: grid; place-items: center;
  color: var(--text-muted);
}

.sidebar-foot { padding: 16px 6px 4px; border-top: 1px solid var(--border); margin-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 4px 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-subtle); color: var(--text);
  display: grid; place-items: center; font-weight: 700;
  border: 1px solid var(--border);
}
.user-name  { font-size: 13px; font-weight: 600; }
.user-email { font-size: 11px; color: var(--text-muted); }

/* ---------- Main / topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(251,249,244,.85);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  position: sticky; top: 0; z-index: 15;
}
[data-theme="dark"] .topbar { background: rgba(11,11,12,.8); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; }
.crumb-mono { font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--bg-elev); border: 1px solid var(--border);
  font-size: 13px; cursor: pointer;
}
.lang-switch:hover { border-color: var(--border-strong); }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: all var(--t);
}
.theme-toggle:hover { border-color: var(--text); }

.page { padding: 32px; max-width: 1400px; width: 100%; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-family: var(--font-serif); font-size: 44px; letter-spacing: -.02em; line-height: 1; margin-bottom: 6px; }
.page-head p  { color: var(--text-2); font-size: 16px; max-width: 64ch; }
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.page-head-row h1 {
  font-family: var(--font-serif);
  font-size: 44px;
  letter-spacing: -.02em;
  line-height: 1;
}
.row-actions {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  justify-content: flex-end;
}
.row-actions .btn {
  padding: 4px 7px; min-width: 30px; height: 30px; font-size: 15px;
  border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.row-actions .btn:hover { background: var(--bg-subtle); }
.row-actions .btn-danger:hover { background: var(--danger-subtle, #fee); color: var(--danger); }

/* Agent table row helpers */
.agent-row-name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px;
}
.agent-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--accent-subtle, #e0f2fe); color: var(--accent);
  font-size: 13px; flex-shrink: 0;
}
.agent-row-desc {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  padding-left: 36px; /* align with text after avatar */
}

/* Serif headings utilitarios */
.serif-h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0;
}
.serif-h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 0 0 8px 0;
}

/* Hr suave para separar secciones */
.divider { height: 1px; background: var(--border); margin: 28px 0; border: 0; }

/* ---------- AUTH (login / register) split-screen ---------- */
.auth-body { background: var(--grad-cream); min-height: 100vh; }
.auth-layout {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 960px) { .auth-layout { grid-template-columns: 1fr; } }

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative;
}
.auth-card {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 28px;
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 14px; font-size: 20px; }
.auth-brand-name { font-family: var(--font-serif); font-size: 24px; letter-spacing: -.01em; }
.auth-title { font-family: var(--font-serif); font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.auth-sub   { color: var(--text-2); font-size: 16px; max-width: 40ch; }

.auth-foot  { color: var(--text-2); font-size: 14px; text-align: center; margin-top: 6px; }
.auth-foot a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.auth-divider {
  display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-lang { display: flex; gap: 8px; justify-content: center; }

/* Hero derecho con preview + gradiente */
.auth-hero {
  background:
    radial-gradient(800px 500px at 70% 20%, rgba(123,108,255,.35) 0%, transparent 60%),
    radial-gradient(600px 400px at 30% 80%, rgba(91,66,255,.25) 0%, transparent 60%),
    var(--ink-950);
  color: #fff;
  position: relative; overflow: hidden;
  padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero-quote { font-family: var(--font-serif); font-size: clamp(32px, 3.2vw, 48px); line-height: 1.1; letter-spacing: -.02em; }
.auth-hero-quote em { font-style: italic; color: var(--violet-400); }
.auth-hero-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,.65); }
.auth-hero-meta .avatar { width: 32px; height: 32px; background: var(--violet-500); color: #fff; border: 0; }

/* Mini-logos ribbon */
.logo-ribbon {
  display: flex; gap: 36px; align-items: center; opacity: .7;
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  flex-wrap: wrap;
}

/* ---------- LANDING ---------- */
.landing-body { background: var(--grad-cream); }
.landing-nav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(251,249,244,.75);
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.landing-nav-inner {
  max-width: var(--container); margin: 0 auto; height: 72px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
}
.landing-nav-links { display: flex; gap: 8px; }
.landing-nav-links a { padding: 8px 14px; border-radius: var(--r-pill); color: var(--text-2); font-size: 14px; font-weight: 500; }
.landing-nav-links a:hover { background: var(--bg-hover); color: var(--text); }

.hero { padding: 80px 28px 60px; max-width: var(--container); margin: 0 auto; text-align: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--bg-elev); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-2); margin-bottom: 20px;
}
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-500); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.hero h1 { font-family: var(--font-serif); font-size: clamp(44px, 7vw, 104px); line-height: .98; letter-spacing: -.025em; margin-bottom: 22px; }
.hero h1 em { font-style: italic; background: var(--grad-violet); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 20px; color: var(--text-2); max-width: 56ch; margin: 0 auto 34px; line-height: 1.55; }
.hero-cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-mockup {
  margin: 60px auto 0; max-width: 1080px;
  border-radius: var(--r-2xl); overflow: hidden;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.section { max-width: var(--container); margin: 0 auto; padding: 80px 28px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .kicker {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin-bottom: 10px;
}
.section-head h2 { font-family: var(--font-serif); font-size: clamp(36px, 5vw, 60px); line-height: 1; letter-spacing: -.02em; margin-bottom: 14px; }
.section-head p  { font-size: 17px; color: var(--text-2); max-width: 58ch; margin: 0 auto; }

.feature {
  padding: 28px; border-radius: var(--r-lg);
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: all var(--t);
  display: flex; flex-direction: column; gap: 12px;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--accent-soft); color: var(--accent-hover);
}
.feature h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.feature p  { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

/* ── Siggy Section (Landing) ── */
.siggy-hero-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, #7b6cff 0%, #a78bfa 50%, #c084fc 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 48px; color: white;
  box-shadow: 0 8px 40px rgba(123, 108, 255, 0.35), 0 0 0 6px rgba(123, 108, 255, 0.1);
  animation: siggy-float 3s ease-in-out infinite;
}
@keyframes siggy-float {
  0%, 100% { transform: translateY(0px); box-shadow: 0 8px 40px rgba(123, 108, 255, 0.35), 0 0 0 6px rgba(123, 108, 255, 0.1); }
  50%      { transform: translateY(-8px); box-shadow: 0 16px 60px rgba(123, 108, 255, 0.4), 0 0 0 8px rgba(123, 108, 255, 0.15); }
}
.siggy-feature-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.siggy-feature-row:last-child { border-bottom: none; }
.siggy-feature-icon { font-size: 24px; flex-shrink: 0; width: 40px; text-align: center; }
.siggy-feature-row strong { display: block; font-size: 16px; margin-bottom: 4px; }
.siggy-feature-row p { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0; }
.siggy-cmd-chip {
  display: inline-block; padding: 8px 16px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-pill); font-size: 13px; color: var(--text-2);
  font-family: var(--font-mono); white-space: nowrap;
  transition: all var(--t);
}
.siggy-cmd-chip:hover {
  border-color: var(--violet-400); color: var(--violet-600);
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(123, 108, 255, 0.15);
}

/* Pricing */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 1060px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .pricing-grid { grid-template-columns: 1fr; } }
.plan {
  padding: 28px; border-radius: var(--r-lg);
  background: var(--bg-elev); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
  position: relative; transition: all var(--t);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.plan.is-popular {
  background: var(--ink-950); color: #fff; border-color: var(--ink-950);
  box-shadow: var(--sh-lg);
}
.plan.is-popular .plan-name, .plan.is-popular .plan-price, .plan.is-popular li { color: #fff; }
.plan-tag {
  position: absolute; top: -12px; left: 28px;
  background: var(--grad-violet); color: #fff;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.plan-name { font-family: var(--font-serif); font-size: 26px; letter-spacing: -.01em; }
.plan-price { font-family: var(--font-serif); font-size: 52px; line-height: 1; letter-spacing: -.02em; }
.plan-price small { font-family: var(--font-sans); font-size: 14px; color: var(--text-muted); font-weight: 500; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); margin: 10px 0; }
.plan ul li { display: flex; gap: 10px; align-items: flex-start; }
.plan ul li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.plan.is-popular ul li::before { color: var(--violet-400); }

/* Testimonio */
.testimonial {
  padding: 48px; border-radius: var(--r-xl);
  background: var(--bg-elev); border: 1px solid var(--border);
  max-width: 780px; margin: 0 auto; text-align: center;
}
.testimonial blockquote {
  font-family: var(--font-serif); font-size: clamp(26px, 3vw, 38px);
  line-height: 1.25; letter-spacing: -.015em;
}
.testimonial blockquote em { color: var(--accent); font-style: italic; }
.testimonial cite {
  font-style: normal; font-size: 13px; color: var(--text-muted);
  display: block; margin-top: 18px;
}

/* CTA final */
.cta {
  max-width: var(--container); margin: 0 auto 80px; padding: 72px 28px;
  border-radius: var(--r-2xl); text-align: center;
  background:
    radial-gradient(800px 500px at 30% 30%, rgba(123,108,255,.4) 0%, transparent 60%),
    radial-gradient(600px 400px at 70% 70%, rgba(91,66,255,.3) 0%, transparent 60%),
    var(--ink-950);
  color: #fff;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { font-family: var(--font-serif); font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -.025em; margin-bottom: 20px; }
.cta p  { font-size: 19px; max-width: 56ch; margin: 0 auto 30px; color: rgba(255,255,255,.75); }

.footer {
  max-width: var(--container); margin: 0 auto; padding: 40px 28px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 13px;
  flex-wrap: wrap; gap: 14px;
}

/* ---------- Toast + Modal ---------- */
#toast-root { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  padding: 14px 18px; border-radius: var(--r-sm);
  background: var(--ink-950); color: #fff; font-size: 14px;
  box-shadow: var(--sh-lg);
  animation: toast-in .3s cubic-bezier(.2,.8,.2,1);
  max-width: 360px;
}
.toast.success { background: var(--emerald-600); }
.toast.error   { background: var(--rose-500); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

#modal-root:empty { display: none; }

/* ---------- modal-overlay / modal-box (usado por window.openModal en app.js) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(11, 11, 12, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade-in .2s;
  isolation: isolate;
  overflow-y: auto;
}
.modal-box {
  background: var(--bg-elev, #ffffff);
  color: var(--text, #0b0b0c);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--r-lg, 14px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35), 0 8px 24px -8px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  position: relative;
  z-index: 10000;
  isolation: isolate;
  animation: modal-in .3s cubic-bezier(.2,.8,.2,1);
}
[data-theme="dark"] .modal-box {
  background: #151518;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}
.modal-box .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .modal-box .modal-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.modal-box .modal-body {
  padding: 20px 22px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  background: rgba(11, 11, 12, 0.62) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid !important;
  place-items: center;
  padding: 24px;
  animation: fade-in .2s;
  isolation: isolate;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none !important; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); width: 100%; max-width: 520px;
  box-shadow: var(--sh-lg);
  animation: modal-in .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-in { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- modal-card (usado en nueva solicitud / aseguradora) ---------- */
.modal-card {
  background: #ffffff !important;
  color: var(--text, #0b0b0c);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35), 0 8px 24px -8px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  position: relative;
  z-index: 10000;
  isolation: isolate;
  animation: modal-in .3s cubic-bezier(.2,.8,.2,1);
}
[data-theme="dark"] .modal-card {
  background: #151518 !important;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: inherit;
}
[data-theme="dark"] .modal-header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.modal-body {
  padding: 22px 24px;
  background: inherit;
}
/* Modal open lock — compensar scrollbar para evitar brinco */
html.modal-open,
body.modal-open {
  overflow: hidden;
  padding-right: var(--modal-scrollbar-gap, 0px);
}

/* ---------- filters-bar ---------- */
.filters-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.filters-bar .input,
.filters-bar .select { min-height: 36px; width: auto; padding: 8px 12px; font-size: 13px; }
.filters-bar .input[type="search"] { flex: 1 1 220px; min-width: 160px; }
.filters-bar .select { flex: 0 1 190px; min-width: 130px; }
.filters-bar .btn { flex-shrink: 0; white-space: nowrap; }

/* Filtros en rejilla compacta (Clientes, etc.) */
.filters-bar--grid {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr) auto;
  gap: 8px 10px;
  align-items: end;
}
.filters-bar--grid .input[type="search"] {
  flex: unset;
  min-width: 0;
  width: 100%;
}
.filters-bar--grid .select {
  min-width: 0;
  width: 100%;
}
@media (max-width: 900px) {
  .filters-bar--grid {
    grid-template-columns: 1fr 1fr;
  }
  .filters-bar--grid .filters-bar__limpiar {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Formulario modal clientes: ubicación en columnas */
.modal-cliente-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.modal-cliente-grid .span-2 {
  grid-column: 1 / -1;
}
.modal-cliente-grid .span-3-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  grid-column: 1 / -1;
}
@media (max-width: 560px) {
  .modal-cliente-grid { grid-template-columns: 1fr; }
  .modal-cliente-grid .span-3-cols { grid-template-columns: 1fr; }
}
.input.input-readonly {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* ---------- form-label helper ---------- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ---------- dropzone ---------- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: border-color .2s, background .2s;
}
.dropzone:hover,
.dropzone.is-drop {
  border-color: var(--accent, #ff6b35);
  background: var(--bg-hover);
}
.dropzone-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-elev); margin: 0 auto 10px;
  display: grid; place-items: center; font-size: 20px;
  color: var(--text-muted);
}
.dropzone-title { font-weight: 600; margin-bottom: 4px; }

.file-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
}

/* ---------- progress-bar (inline, tabla) ---------- */
.progress-bar {
  width: 100%; min-width: 60px; max-width: 120px;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 2px;
}
.progress-fill {
  height: 100%;
  background: var(--accent, #ff6b35);
  transition: width .3s;
}

/* ---------- tabs (detalle solicitud) ---------- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 18px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 13px; font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent, #ff6b35);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------- activity feed (panel derecho detalle) ---------- */
.activity-feed {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.activity-item {
  display: flex; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, #ff6b35);
  margin-top: 6px; flex: 0 0 8px;
}
.activity-body { flex: 1; }
.activity-title { font-size: 13px; font-weight: 600; }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Skeleton / empty ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%; border-radius: var(--r-sm);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty {
  padding: 48px 24px; text-align: center;
  background: var(--bg-elev); border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
}
.empty-icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--bg-subtle); margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 24px; color: var(--text-muted);
}
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p  { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- Animations helpers ---------- */
.fade-up { animation: fade-up .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(14px); transition: all .6s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Utilidades ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }
.center { display: grid; place-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Scrollbar sutil */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Responsive sidebar ---------- */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page { padding: 24px 20px; }
  .page-head h1 { font-size: 32px; }
  .topbar { padding: 0 20px; }
}

/* ═══════════════════ LANDING EXTRA ═══════════════════ */
.hero-microcopy { display: block; }
.section-tight { padding: 32px 28px; }

.prose { max-width: 780px; margin: 0 auto; font-size: 18px; line-height: 1.75; color: var(--text-2); }
.prose p { margin-bottom: 20px; }
.prose strong { color: var(--text-1); font-weight: 600; }

.brand-chip {
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--bg-elev); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-2);
}

.integration-chip {
  padding: 18px 20px; border-radius: var(--r-lg);
  background: var(--bg-elev); border: 1px solid var(--border);
  text-align: center; font-weight: 600; font-size: 14px;
  color: var(--text-1);
  transition: all .2s ease;
}
.integration-chip:hover { border-color: var(--violet-500); transform: translateY(-2px); box-shadow: var(--sh-sm); }

.steps { list-style: none; padding: 0; margin: 0; max-width: 880px; margin: 0 auto; display: grid; gap: 20px; }
.step {
  display: grid; grid-template-columns: 90px 1fr; gap: 24px;
  padding: 28px 32px; border-radius: var(--r-xl);
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: all .2s ease;
}
.step:hover { border-color: var(--violet-500); box-shadow: var(--sh-sm); }
.step-num {
  font-family: var(--font-serif); font-size: 56px; line-height: 1;
  background: var(--grad-violet); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 15px; line-height: 1.6; }

.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 24px; cursor: pointer;
  transition: all .2s ease;
}
.faq-item[open] { border-color: var(--violet-500); box-shadow: var(--sh-sm); }
.faq-item summary {
  font-weight: 600; font-size: 17px; color: var(--text-1);
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 24px; color: var(--violet-500);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin-top: 14px; color: var(--text-2); font-size: 15px; line-height: 1.65;
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  max-width: var(--container); margin: 0 auto;
  padding: 60px 28px 40px;
}
.footer-grid .footer-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-muted); margin-bottom: 14px; font-weight: 600;
}
.footer-grid a {
  display: block; color: var(--text-2); padding: 6px 0;
  font-size: 14px; text-decoration: none;
}
.footer-grid a:hover { color: var(--violet-600); }
.footer-bottom {
  text-align: center; padding: 20px 28px 40px;
  border-top: 1px solid var(--border);
  max-width: var(--container); margin: 0 auto;
}

/* Responsive landing */
@media (max-width: 820px) {
  .landing-nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 20px 20px; }
  .step { grid-template-columns: 60px 1fr; gap: 16px; padding: 20px; }
  .step-num { font-size: 36px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .bento.cols-4, .bento.cols-3 { grid-template-columns: 1fr; }
}

/* ═══════════════════ PLAN PICKER (registro) ═══════════════════ */
.plan-picker {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.plan-option {
  position: relative; display: block; cursor: pointer;
  padding: 16px 14px; border-radius: var(--r-lg);
  background: var(--bg-elev); border: 2px solid var(--border);
  transition: all .18s ease;
}
.plan-option:hover { border-color: var(--violet-200, #c4bbff); }
.plan-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.plan-option:has(input:checked) {
  border-color: var(--violet-500);
  background: linear-gradient(180deg, var(--bg-elev), rgba(123,108,255,.08));
  box-shadow: 0 0 0 3px rgba(123,108,255,.15);
}
.plan-option.is-recommended { border-style: dashed; }
.plan-option-body { text-align: center; }
.plan-option-name { font-weight: 700; font-size: 14px; color: var(--text-1); }
.plan-option-price {
  font-family: var(--font-serif); font-size: 22px; font-style: italic;
  color: var(--violet-600); margin-top: 4px;
}
.plan-option-price small { font-size: 11px; font-style: normal; color: var(--text-muted); }
.plan-option-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.plan-option-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--violet-600); color: #fff;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: var(--r-pill);
}

@media (max-width: 640px) {
  .plan-picker { grid-template-columns: 1fr 1fr; }
}

.form-error {
  margin-top: 12px; padding: 12px 16px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--r-md); color: var(--danger-600, #b91c1c);
  font-size: 14px;
}
