/* DoctorPago — design system */
:root {
  --brand: #0B5A54;
  --brand-dark: #084540;
  --brand-light: #0e6e66;
  --mint: #E6F4F1;
  --mint-deep: #cfe8e2;
  --ink: #1F2933;
  --muted: #52606D;
  --border: #D9E2EC;
  --surface: #ffffff;
  --surface-alt: #F7FAFC;
  --danger: #B91C1C;
  --ok: #0B5A54;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --max: 1120px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
p { margin: 0 0 1rem; color: var(--ink); }
p.lead, .lead { color: var(--muted); font-size: 1.0625rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; color: var(--muted); }
strong { font-weight: 650; }

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
  color: var(--brand);
  font-weight: 750;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
h1 { font-size: clamp(1.85rem, 4.2vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; color: var(--ink); }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.container-narrow { width: min(100% - 2rem, 720px); margin-inline: auto; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--brand);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(220px, 52vw);
  object-fit: contain;
}
.logo-img.logo-lg {
  height: 48px;
  max-width: min(280px, 70vw);
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}
.logo span.tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-top: -2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] {
  background: var(--mint);
  color: var(--brand);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.whatsapp-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 550;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.whatsapp-link:hover { background: var(--mint); color: var(--brand); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid #7dd3c7;
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-secondary:hover { background: var(--mint); color: var(--brand-dark); }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--mint); }
.btn-lg { padding: 0.85rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface-alt); }
.section-mint { background: var(--mint); }
.section-brand {
  background: var(--brand);
  color: #fff;
}
.section-brand h2, .section-brand p { color: #fff; }
.section-brand .muted, .section-brand .tiny { color: rgba(255,255,255,0.8); }
.section-head {
  max-width: 640px;
  margin-bottom: 2rem;
}
.section-head.center {
  text-align: center;
  margin-inline: auto;
}

/* Hero */
.hero {
  padding: 3.25rem 0 3.5rem;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(11,90,84,0.10), transparent 60%),
    linear-gradient(180deg, #f3faf8 0%, #ffffff 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--mint);
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink);
}
.hero-stat svg { flex-shrink: 0; color: var(--brand); }

.hero-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  overflow: hidden;
}
.hero-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 550;
}
.hero-panel-badge {
  background: var(--mint);
  color: var(--brand);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}
.invoice-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.invoice-row:last-child { border-bottom: 0; }
.invoice-row .label { font-size: 0.875rem; color: var(--muted); }
.invoice-row .name { font-weight: 600; font-size: 0.95rem; }
.invoice-row .amt {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--brand);
  text-align: right;
}
.invoice-row .amt small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}
.panel-footer {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--mint);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.panel-footer .big {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.panel-footer .lbl { font-size: 0.75rem; color: var(--muted); font-weight: 550; }

/* Problem band */
.problem-band {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 2rem;
  align-items: center;
}
.problem-band p { font-size: 1.05rem; max-width: 48rem; color: var(--muted); margin: 0; }

/* Steps strip + calculator */
.calc-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
}
.steps-strip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.step-mini {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.step-mini:last-child { border-bottom: 0; padding-bottom: 0; }
.step-mini:first-child { padding-top: 0; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-mini h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.step-mini p { margin: 0; font-size: 0.875rem; color: var(--muted); }

.calc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.calc-card h2 { margin-bottom: 0.35rem; }
.calc-grid {
  display: grid;
  gap: 1.1rem;
  margin: 1.25rem 0 1.5rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.field .hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.input, .select, textarea, input[type="text"], input[type="email"],
input[type="tel"], input[type="number"], input[type="url"], input[type="file"], select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11,90,84,0.15);
}
.input-prefix {
  position: relative;
}
.input-prefix span {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
}
.input-prefix input { padding-left: 2.5rem; }

.range-wrap { display: grid; gap: 0.35rem; }
.range-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
}
.range-val {
  font-weight: 750;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  height: 44px;
  margin: 0;
  cursor: pointer;
}
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.pill {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink);
  cursor: pointer;
}
.pill[aria-pressed="true"], .pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pill:focus-visible {
  outline: 3px solid #7dd3c7;
  outline-offset: 2px;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.calc-result {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 1rem 0.9rem;
  text-align: center;
}
.calc-result.highlight {
  background: var(--brand);
  color: #fff;
}
.calc-result.highlight .cr-label { color: rgba(255,255,255,0.8); }
.calc-result.highlight .cr-val { color: #fff; }
.cr-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.cr-val {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.calc-disclaimer {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.85rem 0 0;
  line-height: 1.45;
}

/* Benefit cards */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Process steps */
.process {
  display: grid;
  gap: 0;
  counter-reset: proc;
}
.process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.process-step:last-child { border-bottom: 0; }
.process-n {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  border: 2px solid var(--brand);
}
.process-step h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--ink); }
.process-step p { margin: 0; color: var(--muted); }

/* Example tables */
.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.example-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.example-card header {
  background: var(--mint);
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.example-card header h3 { margin: 0; font-size: 0.95rem; color: var(--brand); }
.example-card header p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.925rem;
  align-items: baseline;
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.kv.total {
  background: var(--brand);
  color: #fff;
}
.kv.total .k, .kv.total .v { color: #fff; }
.kv.total .v { font-size: 1.05rem; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.95rem;
}
table.data th, table.data td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  background: var(--mint);
  color: var(--brand);
  font-weight: 650;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td:last-child, table.data th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.data .money { font-weight: 650; color: var(--brand); }

/* Audience list */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.check-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 1rem;
  color: var(--ink);
}
.check-list li svg {
  margin-top: 2px;
  color: var(--brand);
  flex-shrink: 0;
}
.note-box {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  background: var(--mint);
  border-radius: var(--radius);
  border-left: 3px solid var(--brand);
  font-size: 0.925rem;
  color: var(--ink);
}

/* FAQ accordion */
.accordion { display: grid; gap: 0.55rem; }
.acc-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.acc-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.15rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 52px;
}
.acc-btn:hover { background: var(--surface-alt); }
.acc-btn:focus-visible {
  outline: 3px solid #7dd3c7;
  outline-offset: -3px;
}
.acc-btn .chev {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--brand);
}
.acc-item[data-open="true"] .chev { transform: rotate(180deg); }
.acc-panel {
  display: none;
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.acc-item[data-open="true"] .acc-panel { display: block; }
.acc-panel p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3.5rem 0;
}
.cta-band h2 { color: #fff; max-width: 32rem; margin-inline: auto  ; margin-bottom: 0.75rem; }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 36rem; margin-inline: auto; margin-bottom: 1.5rem; }
.cta-band .btn-primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}
.cta-band .btn-primary:hover {
  background: var(--mint);
  border-color: var(--mint);
}

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  min-height: 40px;
}
.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}
.field.invalid .form-error { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: var(--danger);
}
.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}
.form-success.visible { display: block; }
.form-success .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}
.form-success h2 { color: var(--brand); }

/* Page hero (inner pages) */
.page-hero {
  padding: 2.75rem 0 2rem;
  background: linear-gradient(180deg, #f3faf8 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: 0.5rem; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

/* Investor blocks */
.blocks-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.lang-switch button {
  border: 0;
  background: #fff;
  padding: 0.45rem 0.95rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  min-height: 40px;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}
.lang-panel[hidden] { display: none !important; }
.legal-flag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #FEF3C7;
  color: #92400E;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Footer */
.site-footer {
  background: #0a3d39;
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand .logo-mark { background: rgba(255,255,255,0.15); }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.9rem; max-width: 22rem; }
.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  font-weight: 650;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  display: grid;
  gap: 0.65rem;
}
.footer-bottom .disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  max-width: 52rem;
  line-height: 1.45;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform 0.15s;
}
.wa-float:hover { transform: scale(1.06); color: #fff; }
.wa-float:focus-visible { outline: 3px solid #7dd3c7; outline-offset: 3px; }
.wa-float span.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Utility */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Responsive tables → cards on mobile */
@media (max-width: 900px) {
  .hero-grid,
  .calc-layout,
  .problem-band,
  .example-grid,
  .cards-3,
  .blocks-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .calc-results { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav, .header-actions .whatsapp-link, .header-actions .btn {
    display: none;
  }
  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    gap: 0.15rem;
    box-shadow: var(--shadow);
  }
  .site-header.nav-open .header-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(var(--header-h) + 200px);
    left: 0; right: 0;
    background: #fff;
    padding: 0 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
    align-items: stretch;
  }
  .site-header.nav-open .header-actions .whatsapp-link,
  .site-header.nav-open .header-actions .btn {
    display: inline-flex;
    justify-content: center;
  }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  table.data.responsive thead { display: none; }
  table.data.responsive,
  table.data.responsive tbody,
  table.data.responsive tr,
  table.data.responsive td {
    display: block;
    width: 100%;
  }
  table.data.responsive tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  table.data.responsive td {
    text-align: left !important;
    padding: 0.35rem 1.1rem;
    border: 0;
  }
  table.data.responsive td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
  }
}

@media (max-width: 480px) {
  .hero { padding: 2rem 0 2.5rem; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* ---------- Portal (login + app shell) ---------- */
body.portal-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(11,90,84,0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(11,90,84,0.08), transparent 50%),
    var(--surface-alt);
}
.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.portal-top {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.portal-top .inner {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.portal-login-wrap {
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 3rem;
}
.portal-login-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}
.portal-login-card h1 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}
.portal-login-card .sub {
  color: var(--muted);
  font-size: 0.925rem;
  margin-bottom: 1.35rem;
}
.portal-alert {
  display: none;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
}
.portal-alert.visible { display: block; }
.portal-alert.info {
  background: var(--mint);
  color: var(--brand-dark);
  border-color: var(--mint-deep);
}
.password-row {
  position: relative;
}
.password-row button.toggle-pw {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 36px;
  padding: 0 0.55rem;
  border-radius: 6px;
}
.password-row button.toggle-pw:hover { background: var(--surface-alt); color: var(--brand); }
.password-row input { padding-right: 4.5rem; }
.portal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 1.1rem;
  font-size: 0.875rem;
}
.portal-meta a { font-weight: 550; text-decoration: none; }
.portal-meta a:hover { text-decoration: underline; }
.portal-foot-note {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}
.portal-demo {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}
.portal-demo code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--ink);
}

/* App layout */
.portal-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.portal-side {
  background: #0a3d39;
  color: rgba(255,255,255,0.88);
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.portal-side .side-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  padding: 0.5rem 0.75rem 0.35rem;
  font-weight: 650;
}
.portal-side a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.925rem;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.portal-side a:hover,
.portal-side a[aria-current="page"] {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.portal-main {
  padding: 1.5rem 1.5rem 2.5rem;
  background: var(--surface-alt);
  overflow-x: auto;
}
.portal-main-inner { max-width: 980px; }
.portal-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.portal-head-row h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
}
.portal-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1.5px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.portal-user-trigger:hover,
.portal-user-trigger:focus-visible {
  background: var(--mint);
  border-color: var(--border);
  outline: none;
}
.portal-user-chevron {
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-left: -0.15rem;
}
.portal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Profile slide */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--mint);
  margin-bottom: 1.15rem;
}
.profile-hero-avatar {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}
.profile-hero-name {
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--ink);
}
.profile-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.1rem;
  background: #fff;
  margin-bottom: 1rem;
}
.profile-section h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}
.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.profile-section-head h3 { margin: 0; }
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}
.auth-user-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.auth-user-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--surface-alt);
}
.auth-user-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.75rem;
}
.auth-user-meta {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}
.auth-user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.auth-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand);
  background: var(--mint);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.auth-badge.muted {
  color: var(--muted);
  background: #f1f5f4;
}
.btn-link {
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-link.danger { color: #b91c1c; }
.auth-user-form {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}
.auth-user-form-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
#profile-email[readonly] {
  background: var(--surface-alt);
  color: var(--muted);
  cursor: default;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-sm);
}
.stat-card .lbl {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.stat-card .val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-card .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.panel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}
.panel-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.panel-card header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--brand);
}
.status-pill.warn { background: #FEF3C7; color: #92400E; }
.status-pill.ok { background: #D1FAE5; color: #065F46; }
.status-pill.muted { background: var(--surface-alt); color: var(--muted); }
.table-wrap { overflow-x: auto; }
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.portal-table th,
.portal-table td {
  padding: 0.75rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.portal-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 650;
  background: var(--surface-alt);
}
.portal-table tr:last-child td { border-bottom: 0; }
.portal-table .money {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--brand);
  white-space: nowrap;
}
.portal-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.portal-banner {
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: var(--brand-dark);
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .portal-app { grid-template-columns: 1fr; }
  .portal-side {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.65rem;
    gap: 0.25rem;
  }
  .portal-side .side-label { display: none; }
  .portal-side a { font-size: 0.85rem; padding: 0.5rem 0.65rem; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .portal-main { padding: 1rem 1rem 2rem; }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
}

/* ---------- Slide-over (ceder factura) ---------- */
.slide-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.slide-root:not([hidden]) { pointer-events: auto; }
.slide-root[hidden] { display: none !important; }
.slide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.slide-root.is-open .slide-backdrop { opacity: 1; }
.slide-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(100%, 440px);
  background: #fff;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  outline: none;
}
.slide-root.is-open .slide-panel { transform: translateX(0); }
.slide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.slide-header h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  color: var(--brand);
}
.slide-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.slide-close:hover { background: var(--surface-alt); color: var(--brand); }
.slide-close:focus-visible { outline: 3px solid #7dd3c7; outline-offset: 2px; }
.slide-body {
  padding: 1.15rem 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}
.file-drop {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  min-height: 96px;
  transition: border-color 0.15s, background 0.15s;
}
.file-drop.is-drag {
  border-color: var(--brand);
  background: var(--mint);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  min-height: 96px;
}
.file-drop-ui {
  pointer-events: none;
  padding: 1.1rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.35rem;
  place-items: center;
}
.file-drop-ui strong { color: var(--brand); font-weight: 650; }
.file-name {
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 550;
  word-break: break-all;
}
.ceder-success {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}
.ceder-success .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}
.ceder-success h3 { margin-bottom: 0.4rem; }
.ceder-success .btn { margin: 0.35rem; }
body.slide-open { overflow: hidden; }

@media (max-width: 480px) {
  .slide-panel { width: 100%; }
  .slide-actions { flex-direction: column-reverse; }
  .slide-actions .btn { width: 100%; }
}

/* ---------- Facturas page ---------- */
.portal-main-wide { max-width: 1100px; }
.status-pill.danger {
  background: #FEE2E2;
  color: #991B1B;
}
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.status-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.facturas-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0.85rem;
  min-height: 46px;
  box-shadow: var(--shadow-sm);
}
.search-field svg { color: var(--muted); flex-shrink: 0; }
.search-field input {
  border: 0;
  outline: none;
  width: 100%;
  min-height: 44px;
  font: inherit;
  background: transparent;
  color: var(--ink);
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.filter-pill {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-pill .count {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-variant-numeric: tabular-nums;
}
.filter-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filter-pill.active .count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.filter-pill:focus-visible {
  outline: 3px solid #7dd3c7;
  outline-offset: 2px;
}
.portal-table tr.is-clickable { cursor: pointer; }
.portal-table tr.is-clickable:hover td { background: var(--mint); }
.portal-table tr.is-selected td { background: var(--mint-deep); }
.portal-table .col-check { width: 40px; }
.portal-table .col-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.slide-panel-lg { width: min(100%, 520px); }
.detalle-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.detalle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
}
.detalle-grid dt {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.15rem;
}
.detalle-grid dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.detalle-block {
  margin-bottom: 1.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.detalle-block h3,
.detalle-form-title {
  font-size: 0.95rem;
  margin: 0.85rem 0 0.55rem;
  color: var(--ink);
}
.note-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.note-timeline li {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
}
.note-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  font-weight: 550;
}
.note-text { font-size: 0.9rem; color: var(--ink); }
.attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.attach-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.attach-list li:last-child { border-bottom: 0; }
.att-name { font-weight: 600; color: var(--brand); word-break: break-all; }

@media (max-width: 600px) {
  .detalle-grid { grid-template-columns: 1fr; }
}

/* ---------- Cashflow / Anticipos ---------- */
.cash-stats .warn-card .val { color: #991B1B; }
.cashflow-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}
.month-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
}
.mb-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
}
.mb-item .lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.mb-item strong {
  font-size: 1.05rem;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.mb-item.risk strong { color: #991B1B; }
.cf-inv-filters { display: flex; gap: 0.5rem; align-items: center; }
.cf-select {
  min-height: 36px;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  width: auto;
  min-width: 200px;
}
.money.risk-num { color: #991B1B !important; font-weight: 750; }
.portal-table tr.is-overdue td { box-shadow: inset 3px 0 0 #DC2626; }
.cf-balance-box {
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.cf-balance-box .lbl {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.cf-balance-box .val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.calc-help {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.15rem 1.25rem;
}
.calc-help h3 { font-size: 0.95rem; margin: 0 0 0.35rem; }
.calc-help p { margin: 0; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 900px) {
  .cashflow-layout { grid-template-columns: 1fr; }
  .calc-help { grid-template-columns: 1fr; }
}

/* ---------- Documentos browser ---------- */
.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.docs-breadcrumb .crumb {
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  min-height: 32px;
}
.docs-breadcrumb .crumb:hover { background: var(--mint); }
.docs-breadcrumb .crumb.current {
  color: var(--ink);
  font-weight: 700;
  cursor: default;
}
.docs-breadcrumb .crumb-sep { color: var(--muted); }
.docs-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}
.docs-grid {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
}
.docs-item {
  display: grid;
  grid-template-columns: 44px 1fr 18px;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.docs-item:hover { border-color: var(--brand); background: var(--mint); }
.docs-item.is-selected {
  border-color: var(--brand);
  background: var(--mint-deep);
}
.docs-item:focus-visible {
  outline: 3px solid #7dd3c7;
  outline-offset: 2px;
}
.docs-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--brand);
  flex-shrink: 0;
}
.docs-item-icon.tone-legal { background: #E0F2FE; color: #075985; }
.docs-item-icon.tone-month { background: var(--mint); color: var(--brand); }
.docs-item-icon.tone-invoice { background: #FEF3C7; color: #92400E; }
.docs-item-icon.tone-pdf { background: #FEE2E2; color: #991B1B; }
.docs-item-icon.tone-image { background: #EDE9FE; color: #5B21B6; }
.docs-item-name {
  display: block;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ink);
}
.docs-item-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.docs-item-chev { color: var(--muted); font-size: 1.1rem; font-weight: 600; }
.docs-preview-pad { padding: 1rem 1.15rem 1.25rem; }
.docs-file-hero {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.docs-file-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--brand);
}
.docs-file-icon.tone-pdf { background: #FEE2E2; color: #991B1B; }
.docs-file-icon.tone-image { background: #EDE9FE; color: #5B21B6; }
.docs-file-name { font-weight: 750; color: var(--ink); font-size: 1rem; word-break: break-word; }
.docs-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
}

/* ---------- Soporte ---------- */
.support-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
.header-actions-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.notif-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1rem 0;
}
.notif-list,
.ticket-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
  max-height: 560px;
  overflow-y: auto;
}
.notif-item,
.ticket-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.notif-item:hover,
.ticket-item:hover {
  border-color: var(--brand);
  background: var(--mint);
}
.notif-item.is-unread {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
  background: #f3faf8;
}
.notif-top,
.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.notif-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: var(--mint);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.notif-title,
.ticket-top strong {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}
.notif-body,
.ticket-preview {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.45;
}
.notif-actions { margin-top: 0.65rem; }
.portal-table tr.is-problem td {
  box-shadow: inset 3px 0 0 #DC2626;
}
.thread-messages {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
  max-height: 50vh;
  overflow-y: auto;
}
.thread-bubble {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  max-width: 95%;
}
.thread-bubble.is-mine {
  background: var(--mint);
  border-color: var(--mint-deep);
  margin-left: auto;
}
.thread-bubble.is-theirs {
  background: #fff;
  margin-right: auto;
}
.thread-reply {
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

@media (max-width: 900px) {
  .support-layout { grid-template-columns: 1fr; }
}
