/* Soy Elegible — Spain elegant theme
   Palette:  burgundy #7B1F26  ·  gold #C9A227  ·  cream #FAF8F4  ·  ink #1A1A1A  ·  line #E8E2D6
   Type:     Playfair Display (serif headings) + Inter (sans body)
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  /* Brand · navy + yellow (logo SoyElegible.es) */
  --burgundy: #1B2D5B;        /* was burgundy — keep var name to minimize churn */
  --burgundy-dark: #0F1B3F;
  --gold: #F0C32C;
  --gold-soft: #FAE5A1;
  --cream: #FAF8F4;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #5C5853;
  --subtle: #8A8680;
  --line: #E5E7ED;
  --line-soft: #EFF1F5;
  --error: #B23A48;
  --success: #2E7D5B;
  --shadow-soft: 0 1px 2px rgba(26,26,26,0.04), 0 4px 16px rgba(26,26,26,0.04);
  --shadow-card: 0 2px 4px rgba(26,26,26,0.05), 0 12px 36px rgba(26,26,26,0.06);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--burgundy-dark); }

/* ---------- Layout ---------- */
.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
@media (min-width: 720px) {
  .shell { padding: 48px 24px 100px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}
@media (min-width: 720px) {
  .brand-logo { height: 36px; }
}
/* legacy .brand-mark / .brand-name kept for emails or fallback */
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-name em {
  color: var(--burgundy);
  font-style: normal;
}

/* ---------- Hero ---------- */
.hero h1 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.08;
  margin-bottom: 14px;
}
.hero h1 .accent { color: var(--burgundy); }
.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 540px;
}
.hero .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}
.hero .meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,39,0.15);
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 720px) {
  .card { padding: 36px 32px; }
}

/* ---------- Quiz ---------- */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.progress span {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  transition: background 0.3s ease;
}
.progress span.done { background: var(--burgundy); }
.progress span.current { background: var(--gold); }

.q-step .q-num {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.q-step h2 {
  font-size: clamp(22px, 3.6vw, 28px);
  line-height: 1.2;
  margin-bottom: 8px;
}
.q-step .q-help {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.choices {
  display: grid;
  gap: 10px;
}
.choice {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.choice:hover {
  border-color: var(--burgundy);
  background: #FFF8F2;
  transform: translateY(-1px);
}
.choice:active { transform: translateY(0); }
.choice .arrow {
  color: var(--subtle);
  transition: color 0.15s ease, transform 0.15s ease;
}
.choice:hover .arrow {
  color: var(--burgundy);
  transform: translateX(3px);
}

.q-back {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-top: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.q-back:hover { color: var(--ink); }

/* ---------- Loader ---------- */
.loader {
  text-align: center;
  padding: 40px 0;
}
.loader .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--burgundy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.loader p { color: var(--muted); margin: 0; font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Result ---------- */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.result-badge.ok { background: rgba(46,125,91,0.1); color: var(--success); }
.result-badge.warn { background: rgba(201,162,39,0.15); color: #8C7416; }
.result-badge.no { background: rgba(178,58,72,0.1); color: var(--error); }

.result h2 {
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.15;
  margin-bottom: 10px;
}
.result .result-lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
}

.kvbox {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 20px 0 28px;
}
.kvbox dl { margin: 0; display: grid; gap: 6px; }
.kvbox dt { font-size: 12px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.08em; }
.kvbox dd { margin: 0 0 6px; font-size: 14px; color: var(--ink); }

/* ---------- Lawyer card ---------- */
.lawyer-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(180deg, #FFF8F2 0%, #FFF 100%);
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  padding: 18px;
  margin: 0 0 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(123,31,38,0.06);
}
.lawyer-avatar {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  overflow: hidden;
}
.lawyer-photo {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-soft);
}
.lawyer-body { flex: 1; min-width: 0; }
.lawyer-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.lawyer-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.lawyer-bio {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.lawyer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.lawyer-cta {
  background: #25D366;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.lawyer-cta:hover { background: #1FB855; color: #fff; }
.lawyer-link {
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Upsell ---------- */
.upsell {
  margin-top: 28px;
  padding: 22px;
  border: 1.5px solid var(--gold-soft);
  border-radius: 12px;
  background:
    radial-gradient(140% 100% at 100% 0%, rgba(201,162,39,0.08) 0%, transparent 60%),
    var(--paper);
  position: relative;
}
.upsell-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,162,39,0.12);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.upsell-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.upsell-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.upsell-desc strong { color: var(--burgundy); font-weight: 700; }
.upsell-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 6px;
}
.upsell-bullets li {
  font-size: 14px;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}
.upsell-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
}

.btn-gold {
  background: linear-gradient(180deg, #D4AC2D 0%, #B8901E 100%);
  color: #1A1407;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 18px rgba(201,162,39,0.25);
  font-weight: 700;
}
.btn-gold:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #1A1407;
}

/* ---------- Form ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(123,31,38,0.1);
}
.field .hint { font-size: 12px; color: var(--subtle); margin-top: 4px; }

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--burgundy);
  color: var(--cream);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 18px rgba(123,31,38,0.18);
}
.btn-primary:hover:not(:disabled) {
  background: var(--burgundy-dark);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.error-msg {
  color: var(--error);
  font-size: 13px;
  margin-top: 8px;
}

/* ---------- Final / thanks ---------- */
.thanks {
  text-align: center;
  padding: 20px 0;
}
.thanks h2 { font-size: clamp(26px, 4.5vw, 34px); margin-bottom: 10px; }
.thanks p { color: var(--muted); margin: 0 0 24px; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  margin-top: 28px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--subtle);
  text-align: center;
}
.disclaimer a { color: var(--subtle); }

/* ---------- /pro page ---------- */
.back-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); text-decoration: underline; }

.pro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 880px) {
  .pro-grid { grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
}

.pro-title {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  margin: 12px 0 14px;
}
.pro-lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.5;
}
.pro-lead strong { color: var(--ink); }

.pro-features {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.pro-feat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.pro-feat-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.pro-feat-h { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.pro-feat-d { font-size: 14px; color: var(--muted); line-height: 1.5; }

.pro-quote {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  border-radius: 6px;
  margin-bottom: 0;
}
.pro-quote p {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 8px;
  font-style: italic;
}
.pro-quote-author {
  font-size: 13px;
  color: var(--muted);
}

.pro-checkout {
  /* sin sticky: causaba solape con .pro-faq cuando el contenido del card
     superaba la altura del viewport */
  position: static;
}
.pro-price { text-align: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pro-price-tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); font-weight: 600; }
.pro-price-amount {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin: 6px 0 4px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
}
.pro-price-amount .cur {
  font-size: 0.5em;
  color: var(--burgundy);
  padding-top: 0.15em;
  margin-right: 0.04em;
  line-height: 1;
}
.pro-price-amount .cents {
  font-size: 0.4em;
  color: var(--muted);
  padding-top: 0.18em;
  margin-left: 0.02em;
  line-height: 1;
}
.pro-price-note { font-size: 12px; color: var(--gold); font-weight: 600; }

.pro-includes-h {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 600;
  margin-bottom: 8px;
}
.pro-includes ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 14px;
  display: grid;
  gap: 6px;
}
.pro-includes li {
  padding-left: 22px;
  position: relative;
}
.pro-includes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.pro-trust {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  color: var(--subtle);
  margin: 12px 0 0;
}
.pro-fineprint {
  font-size: 11px;
  color: var(--subtle);
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}

.pro-faq {
  margin-top: 18px;
  font-size: 14px;
}
.pro-faq details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  cursor: pointer;
}
.pro-faq summary {
  font-weight: 600;
  list-style: none;
  outline: none;
  position: relative;
  padding-right: 24px;
}
.pro-faq summary::after { content: '+'; position: absolute; right: 0; color: var(--gold); font-size: 18px; line-height: 1; }
.pro-faq details[open] summary::after { content: '−'; }
.pro-faq p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.checkout-overlay {
  position: fixed; inset: 0;
  background: rgba(26,26,26,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 99;
  animation: fadeIn 0.2s ease;
}
.checkout-card {
  background: var(--paper);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.checkout-close {
  position: absolute;
  top: 12px; right: 14px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--subtle);
  cursor: pointer;
  line-height: 1;
}
.checkout-h {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.checkout-stripe-mock {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.stripe-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stripe-row:last-child { border-bottom: none; }
.stripe-row > div:first-child { color: var(--subtle); }
.stripe-cell { color: var(--ink); font-weight: 500; max-width: 60%; text-align: right; }

/* ---------- Admin ---------- */
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.admin-head h1 { font-size: 24px; }
.admin-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 24px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat .label { font-size: 12px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.stat .delta { font-size: 12px; color: var(--gold); margin-top: 2px; font-weight: 600; }

.admin-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.admin-section h2 { font-size: 18px; margin-bottom: 12px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
  font-weight: 600;
}
.admin-table tr:hover td { background: var(--cream); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tag.ok { background: rgba(46,125,91,0.12); color: var(--success); }
.tag.warn { background: rgba(201,162,39,0.18); color: #8C7416; }
.tag.no { background: rgba(178,58,72,0.1); color: var(--error); }

textarea.legal {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
textarea.legal:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(123,31,38,0.1); }

/* ---------- Lawyer auth ---------- */
.auth-bg {
  min-height: 100vh;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(201,162,39,0.08), transparent 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(123,31,38,0.06), transparent 60%),
    var(--cream);
}
.auth-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 880px) {
  .auth-shell { grid-template-columns: 420px 1fr; gap: 60px; align-items: center; }
}
.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}
.auth-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-title {
  font-size: 28px;
  margin: 0 0 8px;
  line-height: 1.15;
}
.auth-lead {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.auth-aside-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  background: rgba(201,162,39,0.12);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.auth-stat-v {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--burgundy);
  line-height: 1;
}
.auth-stat-l {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Lawyer portal ---------- */
.portal-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--cream);
}
@media (min-width: 880px) {
  .portal-bg { grid-template-columns: 240px 1fr; }
}

.portal-side {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  min-height: 100vh;
}
.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portal-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.portal-link:hover { background: var(--cream); color: var(--ink); }
.portal-link.active { background: rgba(123,31,38,0.06); color: var(--burgundy); font-weight: 600; }
.portal-link-badge {
  margin-left: auto;
  background: var(--burgundy);
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
}

.portal-main {
  padding: 28px 32px 60px;
  max-width: 1200px;
}
@media (max-width: 880px) {
  .portal-main { padding: 24px 16px 60px; }
}

.portal-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
@media (min-width: 1100px) {
  .portal-head { grid-template-columns: 1fr auto; align-items: end; }
}
.portal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stat-mini {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}
.stat-mini .v {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.stat-mini .l { font-size: 11px; color: var(--subtle); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }

.portal-panel { display: none; }
.portal-panel.active { display: block; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 22px; margin-bottom: 4px; }
.panel-head p { color: var(--muted); font-size: 13px; margin: 0; }
.panel-head p strong { color: var(--ink); }
.panel-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Alert bar */
.alert-bar {
  background: rgba(201,162,39,0.08);
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Case list (partner portal) */
.case-list { display: grid; gap: 12px; }
.case-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  align-items: start;
  transition: all 0.15s ease;
}
.case-item:hover { border-color: var(--gold-soft); }
.case-status { padding-top: 2px; }
.case-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.case-name { font-weight: 600; font-size: 16px; color: var(--ink); }
.case-paid { font-size: 12px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.case-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.case-summary { font-size: 13px; color: var(--ink); line-height: 1.5; margin-bottom: 10px; }
.case-next {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
}
.case-next-h {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2px;
}
.case-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) {
  .case-item { grid-template-columns: 1fr; }
  .case-actions { flex-direction: row; }
}

/* Docs inbox */
.docs-list { display: grid; gap: 10px; }
.doc-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  align-items: center;
}
.doc-icon {
  width: 40px; height: 40px;
  background: var(--cream);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.doc-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; }
.doc-actions { display: flex; gap: 6px; }

/* Commission summary */
.metric-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}
.metric-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.metric-summary-row:first-child { border-top: none; padding-top: 0; }
.metric-summary-label { color: var(--muted); }
.metric-summary-value {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

/* Lead list (legacy demo) */
.lead-list { display: grid; gap: 10px; }
.lead-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  align-items: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-item:hover { border-color: var(--gold-soft); box-shadow: 0 4px 16px rgba(0,0,0,0.04); }
.lead-score { padding-top: 2px; }
.lead-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  gap: 12px;
}
.lead-name { font-weight: 600; font-size: 16px; color: var(--ink); }
.lead-paid { font-size: 12px; color: var(--gold); font-weight: 600; }
.lead-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.lead-summary { font-size: 13px; color: var(--ink); line-height: 1.5; }
.lead-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 720px) {
  .lead-item { grid-template-columns: 1fr; }
  .lead-actions { flex-direction: row; }
}
.tag-inline {
  font-size: 11px;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--muted);
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.pcol {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-height: 200px;
}
.pcol-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.pcol-count {
  background: var(--cream);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
}
.pcol-body { display: flex; flex-direction: column; gap: 6px; }
.pcard {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.pcard-name { font-weight: 600; color: var(--ink); }
.pcard-val { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Campaigns */
.campaign-list { display: grid; gap: 12px; }
.campaign {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.campaign h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 6px;
}
.campaign-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}
.campaign-source {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.campaign-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}
.campaign-stats strong { color: var(--ink); }
.campaign-pending { background: var(--cream); }

/* Library */
.library { display: grid; gap: 10px; }
.lib-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  align-items: start;
}
.lib-thumb {
  width: 56px; height: 56px;
  background: var(--cream);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.lib-title { font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.lib-meta { font-size: 12px; color: var(--subtle); margin-bottom: 6px; }
.lib-snippet {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid var(--gold-soft);
  padding-left: 10px;
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.metric-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.metric-l { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); font-weight: 600; }
.metric-v {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0 4px;
  line-height: 1;
}
.metric-d { font-size: 12px; color: var(--muted); }
.metric-d.ok { color: var(--success); font-weight: 600; }

/* ---------- Result-page ladder (Kit €47 + Servicio €297) ---------- */
.ladder {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) {
  .ladder { grid-template-columns: 1fr 1fr; }
}
.ladder-card {
  border-radius: 12px;
  padding: 22px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.ladder-card.ladder-kit { border-color: var(--line); }
.ladder-card.ladder-pro {
  border-color: var(--gold-soft);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(201,162,39,0.08), transparent 60%),
    var(--paper);
}
.ladder-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,162,39,0.12);
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 10px;
}
.ladder-price {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--burgundy);
  line-height: 1;
  margin-bottom: 6px;
}
.ladder-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.ladder-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
.ladder-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13px;
  display: grid;
  gap: 5px;
  flex: 1;
}
.ladder-bullets li {
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.ladder-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Servicio · vs-box ---------- */
.vs-box {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}
@media (min-width: 720px) {
  .vs-box { grid-template-columns: 1fr 1fr; gap: 14px; }
}
.vs-col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.vs-col.vs-good {
  border-color: var(--gold-soft);
  background: linear-gradient(180deg, #FFF8F2, #FFF);
}
.vs-h {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.vs-h.vs-bad { color: var(--muted); }
.vs-good .vs-h { color: var(--burgundy); }
.vs-col ul {
  margin: 0; padding: 0; list-style: none;
  display: grid;
  gap: 6px;
}
.vs-col li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.vs-col li::before {
  content: '·';
  position: absolute;
  left: 8px;
  top: -3px;
  color: var(--subtle);
  font-size: 18px;
}
.vs-good li::before { content: '✓'; color: var(--gold); font-weight: 700; font-size: 13px; top: 0; }

/* ---------- Pro · example-box ---------- */
.example-box {
  background: linear-gradient(180deg, #FFF8F2, #FFF);
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 28px;
  position: relative;
}
.example-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201,162,39,0.15);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.example-box p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: var(--ink);
}
.example-box em { color: var(--muted); }
.example-box u { text-decoration: underline; text-decoration-color: var(--burgundy); text-decoration-thickness: 2px; }

/* ---------- Kit (long-form reader) ---------- */
.kit-body { background: #F5F1E8; }
.kit-toolbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
}
.kit-toolbar-back { color: var(--muted); text-decoration: none; }
.kit-toolbar-back:hover { color: var(--ink); }
.kit-toolbar-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}
.kit-toolbar-btn:hover { border-color: var(--ink); color: var(--ink); }

.kit-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.kit-doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 48px 44px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 720px) {
  .kit-doc { padding: 32px 20px; border-radius: 8px; }
}

.kit-header { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.kit-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.kit-doc h1 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.kit-intro {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}
.kit-situation {
  background: var(--cream);
  border-left: 3px solid var(--burgundy);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.kit-situation-h {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--subtle);
}
.kit-situation-b {
  font-size: 14px;
  color: var(--ink);
  margin-top: 4px;
}
.kit-nat-tip {
  background: rgba(201,162,39,0.08);
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  padding: 14px 16px;
}
.kit-nat-tip-h { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.kit-nat-tip { font-size: 14px; line-height: 1.55; color: var(--ink); }

.kit-doc h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 36px 0 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
}
.kit-doc h2:first-of-type { border-top: none; padding-top: 0; }
.kit-doc h3 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 10px;
}
.kit-doc p { margin: 0 0 12px; line-height: 1.65; font-size: 15px; }
.kit-doc strong { color: var(--ink); font-weight: 700; }

.kit-checklist, .kit-flags, .kit-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.kit-checklist li {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px 14px 12px 38px;
  position: relative;
  font-size: 14px;
  line-height: 1.55;
}
.kit-checklist li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--success);
  font-weight: 700;
}
.kit-flags { counter-reset: flag; list-style: none; }
.kit-flags li {
  counter-increment: flag;
  background: rgba(178,58,72,0.04);
  border-left: 3px solid var(--error);
  border-radius: 4px;
  padding: 12px 14px 12px 44px;
  position: relative;
  font-size: 14px;
  line-height: 1.55;
}
.kit-flags li::before {
  content: counter(flag);
  position: absolute;
  left: 14px;
  top: 11px;
  width: 22px; height: 22px;
  background: var(--error);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.kit-steps { counter-reset: step; }
.kit-steps li {
  counter-increment: step;
  padding: 0 0 0 36px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.kit-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px; height: 26px;
  background: var(--burgundy);
  color: var(--cream);
  border-radius: 50%;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.kit-aside {
  background: rgba(201,162,39,0.06);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
  margin: 14px 0 0;
}

.kit-template {
  background: #1F1F1F;
  color: #F7F5F1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 12px 0 18px;
}

.kit-case {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 14px;
}
.kit-case h3 { margin-top: 8px; }
.kit-case-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.kit-case-tag.ok { background: rgba(46,125,91,0.12); color: var(--success); }
.kit-case-tag.no { background: rgba(178,58,72,0.12); color: var(--error); }
.kit-case-tag.warn { background: rgba(201,162,39,0.18); color: #8C7416; }
.kit-case ul { padding-left: 18px; margin: 8px 0; font-size: 14px; line-height: 1.55; }

.kit-disclaimer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--subtle);
  line-height: 1.6;
}

/* Print friendly */
@media print {
  .kit-toolbar { display: none; }
  .kit-shell { padding: 0; max-width: 100%; }
  .kit-doc { box-shadow: none; border: none; padding: 0; }
  body { background: white; }
}

/* ---------- Chat agente del Kit ---------- */
.chat-body { background: var(--cream); }

.chat-toolbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
}
.chat-toolbar-back { color: var(--ink); text-decoration: none; font-weight: 600; }

.chat-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 200px; /* deja espacio para input fijo + posible report banner */
}

.chat-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}
.chat-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-soft);
  flex: 0 0 auto;
}
.chat-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeIn 0.2s ease;
}
.chat-bubble.chat-user { flex-direction: row-reverse; }
.chat-bubble-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-soft);
  flex: 0 0 auto;
}
.chat-bubble-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.chat-bubble.chat-assistant .chat-bubble-body {
  border-top-left-radius: 4px;
}
.chat-bubble.chat-user .chat-bubble-body {
  background: var(--burgundy);
  color: var(--cream);
  border-color: var(--burgundy);
  border-top-right-radius: 4px;
}
.chat-bubble-rich p { margin: 0 0 8px; }
.chat-bubble-rich p:last-child { margin-bottom: 0; }
.chat-bubble-rich strong { font-weight: 700; }
.chat-bubble-rich em { color: var(--muted); }

.chat-typing .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--subtle);
  animation: typing 1.2s infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-report {
  /* Inline (no sticky) para evitar solape con chat-input fijo */
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFF8E1 0%, #FFF 100%);
  border: 1.5px solid var(--gold-soft);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  flex-wrap: wrap;
}

.chat-input {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  z-index: 20;
}
.chat-input form,
.chat-input {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 760px;
  margin: 0 auto;
}
.chat-input textarea {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  min-height: 44px;
  max-height: 160px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.chat-input textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(27,45,91,0.08);
}
.chat-input button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  flex: 0 0 auto;
}

/* ---------- Hidden ---------- */
.hidden { display: none !important; }

.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
