/* CrediPremium — verde billete, dorado y tinta de sello. */
:root {
  --ink: #1a2620;
  --muted: #5b6a62;
  --faint: #8a978f;
  --bg: #edf1ed;
  --surface: #ffffff;
  --paper: #fbfcf9;
  --line: #d8e0da;
  --line-strong: #c3cec6;
  --green-950: #0b2e22;
  --green-900: #0e3b2b;
  --green-800: #14513a;
  --green-700: #17694a;
  --green-500: #2e9a6b;
  --green-100: #d6ecdf;
  --green-50: #ecf6f0;
  --gold: #c99a2e;
  --gold-600: #a97f1e;
  --gold-50: #fbf3df;
  --stamp: #2f45b0;
  --red: #bf3a30;
  --red-50: #fbeae7;
  --amber: #a86d12;
  --amber-50: #fdf2dc;
  --wa: #1fa855;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 248px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--green-900);
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.75rem;
  font-weight: 700;
}
h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
small,
.small {
  font-size: 0.85rem;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.num,
table {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.right {
  text-align: right;
}
.center {
  text-align: center;
}
.hidden,
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.i-lg {
  width: 22px;
  height: 22px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 0.93rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--green-700);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-800);
  color: #fff;
}
.btn-gold {
  background: var(--gold);
  color: var(--green-950);
}
.btn-gold:hover {
  background: #d8aa3d;
  color: var(--green-950);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--green-700);
  color: var(--green-800);
}
.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-outline-light:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.btn-quiet {
  background: transparent;
  color: var(--green-700);
  padding-inline: 8px;
}
.btn-quiet:hover {
  background: var(--green-50);
}
.btn-danger {
  background: var(--surface);
  border-color: #e3b8b3;
  color: var(--red);
}
.btn-danger:hover {
  background: var(--red-50);
  color: var(--red);
}
.btn-wa {
  background: var(--wa);
  color: #fff;
}
.btn-wa:hover {
  background: #178a45;
  color: #fff;
}
.btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ---------- Formularios ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.field > label,
.label {
  font-weight: 600;
  font-size: 0.88rem;
}
.hint {
  font-size: 0.8rem;
  color: var(--muted);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='number'],
input[type='date'],
input[type='search'],
input[type='url'],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 500 0.95rem/1.3 var(--body);
}
textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(46, 154, 107, 0.18);
}
.input-prefix {
  position: relative;
}
.input-prefix > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  pointer-events: none;
}
.input-prefix > input {
  padding-left: 46px;
}
.input-suffix {
  position: relative;
}
.input-suffix > span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-700);
  flex: none;
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 0 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.segmented label {
  position: relative;
  cursor: pointer;
}
.segmented input {
  position: absolute;
  opacity: 0;
}
.segmented span {
  display: block;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.segmented label + label span {
  border-left: 1px solid var(--line-strong);
}
.segmented input:checked + span {
  background: var(--green-900);
  color: #fff;
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}
.form-section > h3 {
  margin-bottom: 4px;
}
.form-section > p.muted {
  margin-bottom: 14px;
}
.errors {
  background: var(--red-50);
  border: 1px solid #efc4be;
  color: #8e2a22;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.errors ul {
  margin: 0;
  padding-left: 18px;
}

/* ---------- Avisos ---------- */
.flash {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 500;
  border: 1px solid;
}
.flash-success {
  background: var(--green-50);
  border-color: var(--green-100);
  color: var(--green-900);
}
.flash-error {
  background: var(--red-50);
  border-color: #efc4be;
  color: #8e2a22;
}
.notice {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-50);
  border: 1px solid #ecd9a6;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

/* ---------- Superficies ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.panel + .panel {
  margin-top: 18px;
}
.cols > .panel + .panel,
.cols-even > .panel + .panel {
  margin-top: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.panel-flush {
  padding: 0;
  overflow: hidden;
}
.panel-flush > .panel-head {
  padding: 16px 20px 0;
}
.stack > * + * {
  margin-top: 18px;
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.cols-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
}
.dl dt {
  color: var(--muted);
  font-size: 0.88rem;
}
.dl dd {
  margin: 0;
  font-weight: 600;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
  border: 0;
}

/* ---------- Badges y sello ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  background: #eef1ef;
  color: var(--muted);
}
.badge-green {
  background: var(--green-50);
  color: var(--green-800);
}
.badge-red {
  background: var(--red-50);
  color: var(--red);
}
.badge-amber {
  background: var(--amber-50);
  color: var(--amber);
}
.badge-gold {
  background: var(--gold-50);
  color: var(--gold-600);
}
.badge-ink {
  background: var(--green-900);
  color: #fff;
}
.badge-blue {
  background: #e9ecfa;
  color: var(--stamp);
}

.stamp {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stamp);
  padding: 3px 8px;
  border: 2px solid currentColor;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px currentColor;
  transform: rotate(-9deg);
  opacity: 0.88;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.2 0 0 0 -0.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.2 0 0 0 -0.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp-red {
  color: var(--red);
}
.stamp-lg {
  font-size: 1.05rem;
  padding: 6px 14px;
  border-width: 3px;
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 5px currentColor;
}

/* ---------- Tarjeta de cobro (calendario de cuotas) ---------- */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--paper);
}
.ledger-cell {
  position: relative;
  min-height: 104px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
}
button.ledger-cell {
  cursor: pointer;
  border-top: 0;
  border-left: 0;
}
button.ledger-cell:hover {
  background: var(--green-50);
}
.ledger-cell .n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--faint);
}
.ledger-cell .d {
  font-size: 0.82rem;
  color: var(--muted);
}
.ledger-cell .a {
  margin-top: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ledger-cell .extra {
  font-size: 0.75rem;
  font-weight: 700;
}
.ledger-cell.is-paid .a,
.ledger-cell.is-paid .d {
  color: var(--faint);
}
.ledger-cell.is-paid .stamp {
  position: absolute;
  right: 8px;
  top: 30px;
}
.ledger-cell.is-overdue {
  box-shadow: inset 3px 0 0 var(--red);
}
.ledger-cell.is-overdue .d {
  color: var(--red);
  font-weight: 600;
}
.ledger-cell.is-today {
  box-shadow: inset 3px 0 0 var(--amber);
  background: var(--amber-50);
}
.ledger-cell.is-partial .extra {
  color: var(--amber);
}

/* ---------- Tablas y listas ---------- */
.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--paper);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover td {
  background: #f7faf7;
}
.table .num {
  text-align: right;
  white-space: nowrap;
}
.row-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.row-link:hover {
  color: var(--green-700);
  text-decoration: underline;
}
.person {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--green-100);
  color: var(--green-900);
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}
.person .meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Lista de cobro */
.collect-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.collect-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.collect-item:last-child {
  border-bottom: 0;
}
.collect-item.is-overdue {
  box-shadow: inset 3px 0 0 var(--red);
}
.collect-item.is-today {
  box-shadow: inset 3px 0 0 var(--amber);
}
.collect-amount {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
}
.collect-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs a:hover {
  color: var(--ink);
}
.tabs a.active {
  color: var(--green-900);
  border-bottom-color: var(--green-700);
}
.tabs .count {
  font-size: 0.75rem;
  background: #e5ebe6;
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--ink);
}
.tabs a.active .count {
  background: var(--green-900);
  color: #fff;
}

.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
}
.empty h3 {
  color: var(--ink);
}
.empty .btn {
  margin-top: 6px;
}

/* ---------- Indicadores del inicio ---------- */
.kpis {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.kpi {
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}
.kpi:first-child {
  border-left: 0;
  background: var(--green-900);
  color: #fff;
}
.kpi .k-label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}
.kpi:first-child .k-label {
  color: #a9c9b8;
}
.kpi .k-value {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi:first-child .k-value {
  font-size: 2rem;
  color: #fff;
}
.kpi .k-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}
.kpi:first-child .k-sub {
  color: #cfe3d7;
}
.kpi .k-sub b {
  color: var(--gold);
}
.k-value.red {
  color: var(--red);
}

.bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  height: 150px;
  padding-top: 10px;
}
.bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.bar-fill {
  width: 100%;
  max-width: 44px;
  background: var(--green-100);
  border-radius: 6px 6px 2px 2px;
  min-height: 3px;
}
.bar.current .bar-fill {
  background: var(--green-700);
}
.bar-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.progress {
  height: 8px;
  background: #e3e9e4;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--green-500);
  border-radius: inherit;
}

/* ---------- Reporte de crédito ---------- */
.score {
  display: flex;
  gap: 20px;
  align-items: center;
}
.score-dial {
  --v: 0;
  --c: var(--faint);
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), #e5ebe6 0);
}
.score-dial > div {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}
.score-dial b {
  font-family: var(--display);
  font-size: 2rem;
}
.score-dial small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}
.rating-excellent {
  --c: var(--green-500);
}
.rating-good {
  --c: #6aa84f;
}
.rating-fair {
  --c: var(--gold);
}
.rating-risk {
  --c: var(--red);
}
.rating-label {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fact {
  padding: 12px 14px;
  border-left: 1px solid var(--line);
}
.fact:first-child {
  border-left: 0;
}
.fact b {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
}
.fact span {
  font-size: 0.8rem;
  color: var(--muted);
}
.bl-entry {
  border: 1px solid #efc4be;
  background: #fff8f7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.bl-entry + .bl-entry {
  margin-top: 10px;
}
.bl-entry.resolved {
  border-color: var(--line);
  background: var(--paper);
}
.quick-check {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
}
.quick-check.risk {
  background: var(--red-50);
  border-color: #efc4be;
  color: #8e2a22;
}
.quick-check.ok {
  background: var(--green-50);
  border-color: var(--green-100);
}

.sim-total {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sim-total > div {
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}
.sim-total > div:first-child {
  border-left: 0;
  background: var(--green-900);
  color: #fff;
}
.sim-total > div:first-child .muted {
  color: #a9c9b8;
}
.sim-total b {
  display: block;
  font-family: var(--display);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}
.sticky {
  position: sticky;
  top: 20px;
}

/* ---------- Diálogos ---------- */
dialog {
  border: 0;
  padding: 0;
  border-radius: 14px;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(11, 46, 34, 0.28);
}
dialog::backdrop {
  background: rgba(11, 46, 34, 0.45);
}
dialog[open] {
  animation: pop 0.16s ease-out;
}
@keyframes pop {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
}
.dialog-head {
  padding: 18px 20px 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-body {
  padding: 8px 20px 4px;
}
.dialog-foot {
  padding: 12px 20px 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.icon-btn {
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
}
.icon-btn:hover {
  background: #eef2ef;
  color: var(--ink);
}
.file-drop {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}
.file-drop:hover {
  border-color: var(--green-500);
  color: var(--green-800);
}
.file-drop input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.file-drop:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Estructura del panel ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--green-950);
  color: #d5e4db;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand:hover {
  color: #fff;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand em {
  font-style: normal;
  color: var(--gold);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group {
  margin-top: 16px;
  padding: 0 10px 6px;
  font-size: 0.75rem;
  color: #7fa292;
  font-weight: 600;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #cfe0d6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav a.active {
  background: rgba(201, 154, 46, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav a.active .i {
  color: var(--gold);
}
.nav .pill {
  margin-left: auto;
  background: var(--gold);
  color: var(--green-950);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.me {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
}
.me .avatar {
  width: 34px;
  height: 34px;
  background: var(--green-800);
  color: #fff;
}
.me-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.2;
}
.me-plan {
  font-size: 0.78rem;
  color: #9dbcab;
}
.logout {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cfe0d6;
}
.logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.back {
  display: inline-flex;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 6px;
}
.back:hover {
  color: var(--green-700);
}
.topbar h1 {
  margin: 0;
}
.topbar .sub {
  color: var(--muted);
  margin: 2px 0 0;
}
.content {
  padding: 28px 32px 56px;
  width: 100%;
  max-width: 1240px;
}
.mobilebar,
.bottomnav,
.scrim {
  display: none;
}
.trial-strip {
  background: var(--gold-50);
  border-bottom: 1px solid #ecd9a6;
  padding: 9px 32px;
  font-size: 0.88rem;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.trial-strip.urgent {
  background: var(--red-50);
  border-color: #efc4be;
}

/* ---------- Páginas públicas ---------- */
.site-header {
  background: var(--green-950);
}
.site-nav {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-links a:not(.btn) {
  color: #d5e4db;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.site-links a:not(.btn):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.hero {
  background: var(--green-950);
  color: #e6f0ea;
  padding: 48px 0 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
.hero-copy {
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 14ch;
}
.hero p.lead {
  font-size: 1.12rem;
  color: #bcd5c7;
  max-width: 46ch;
  margin-bottom: 26px;
}
.hero .fine {
  font-size: 0.85rem;
  color: #8fb1a0;
  margin-top: 14px;
}
.hero-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px 14px 0 0;
  padding: 18px 18px 0;
  transform: translateY(2px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
.hero-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
}
.hero-card .ledger {
  grid-template-columns: repeat(4, 1fr);
}
.hero-card .ledger-cell {
  min-height: 92px;
}
.section {
  padding: 72px 0;
}
.section-tight {
  padding: 48px 0;
}
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section .intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 36px;
  border-top: 2px solid var(--green-900);
}
.feature {
  padding: 22px 22px 26px 0;
  border-bottom: 1px solid var(--line-strong);
}
.feature + .feature {
  padding-left: 22px;
  border-left: 1px solid var(--line-strong);
}
.feature:nth-child(3n + 1) {
  padding-left: 0;
  border-left: 0;
}
.feature h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 1.08rem;
}
.feature h3 .i {
  color: var(--green-700);
}
.feature p {
  color: var(--muted);
  margin: 0;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price {
  background: var(--green-950);
  color: #dbe8e0;
  border-radius: 18px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}
.price-amount {
  font-family: var(--display);
  font-weight: 800;
  font-size: 4rem;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.price-amount small {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a9c9b8;
  letter-spacing: 0;
}
.price ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.price li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.price li .i {
  color: var(--gold);
  margin-top: 2px;
}
.site-footer {
  background: var(--green-950);
  color: #8fb1a0;
  padding: 32px 0;
  font-size: 0.9rem;
}
.site-footer a {
  color: #cfe0d6;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.public-main {
  min-height: 60vh;
}
.page-head {
  background: var(--green-950);
  color: #cfe0d6;
  padding: 36px 0 40px;
}
.page-head h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head p {
  max-width: 60ch;
  margin: 0;
}
.lender-list {
  display: grid;
  gap: 14px;
}
.lender-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.lender-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--green-50);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--green-800);
  border: 1px solid var(--line);
}
.lender-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lender-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 4px;
}
.search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -24px 0 24px;
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
}
.search-bar > * {
  flex: 1 1 180px;
}
.search-bar .btn {
  flex: 0 0 auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
.auth-side {
  background: var(--green-950);
  color: #cfe0d6;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.auth-side h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-box {
  width: min(460px, 100%);
}
.auth-box h1 {
  font-size: 1.9rem;
  font-weight: 800;
}

/* ---------- Seguridad y cuenta ---------- */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.label-row label {
  font-weight: 600;
  font-size: 0.88rem;
}
.auth-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-800);
  margin-bottom: 16px;
}
.auth-icon .i {
  width: 26px;
  height: 26px;
}
.auth-icon-warn {
  background: var(--amber-50);
  color: var(--amber);
}
input.code-input {
  font: 700 1.6rem/1 var(--display);
  letter-spacing: 0.32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-height: 56px;
}
input.code-input-text {
  font-size: 1.2rem;
  letter-spacing: 0.12em;
}
.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.panel-title-row h2 {
  margin: 0;
}
.disclosure {
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
  margin-top: 12px;
}
.disclosure summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-700);
  font-size: 0.92rem;
}
.disclosure-body {
  padding-top: 12px;
}
.activity {
  list-style: none;
  margin: 0;
  padding: 6px 0 8px;
}
.activity li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.activity li:last-child {
  border-bottom: 0;
}
.activity li.is-warn {
  box-shadow: inset 3px 0 0 var(--red);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps[start="3"] {
  counter-reset: step 2;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-900);
  color: #fff;
  font: 700 0.85rem/1 var(--display);
}
.qr-box {
  margin: 14px 0 6px;
  width: 210px;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.qr-box svg {
  display: block;
  width: 100%;
  height: auto;
}
.secret-key {
  display: block;
  font: 700 1rem/1.5 ui-monospace, Consolas, monospace;
  letter-spacing: 0.06em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  word-break: break-all;
}
.recovery-codes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.recovery-codes code {
  display: block;
  text-align: center;
  font: 700 1.05rem/1 ui-monospace, Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.notice-red {
  background: var(--red-50);
  border-color: #efc4be;
}
.notice-ok {
  background: var(--green-50);
  border-color: var(--green-100);
}

/* ---------- Equipo ---------- */
.credentials {
  border: 2px solid var(--green-700);
  background: var(--green-50);
  margin-bottom: 18px;
}
.credentials-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: var(--green-800);
}
.credentials-head h2 {
  margin: 0 0 2px;
  color: var(--ink);
}
.cred-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.cred-list div {
  background: var(--surface);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 0;
}
.cred-list dt {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.cred-list dd {
  margin: 2px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.cred-list code {
  font: 700 1.1rem/1.3 ui-monospace, Consolas, monospace;
  color: var(--green-900);
}
.count-chip {
  font: 700 0.82rem/1 var(--body);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-800);
}
.count-chip.is-full {
  background: var(--gold-50);
  color: var(--gold-600);
}
.member-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.member {
  display: grid;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.member.is-off .person {
  opacity: 0.6;
}
.member-name {
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.member-actions {
  gap: 2px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  background: var(--paper);
}
.btn.danger-text {
  color: var(--red);
}
.perm-grid {
  display: grid;
  gap: 6px;
  margin: 4px 0 16px;
}
.perm-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.perm-grid legend {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.perm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.perm:hover {
  border-color: var(--line-strong);
}
.perm:has(input:checked) {
  border-color: var(--green-500);
  background: var(--green-50);
}
.perm input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-700);
  flex: none;
}
.perm span {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  line-height: 1.3;
}
.perm small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Portal del cobrador ---------- */
.today-tally {
  display: flex;
  align-items: center;
  gap: 8px 22px;
  flex-wrap: wrap;
  background: var(--green-950);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 14px;
}
.today-tally > div {
  display: flex;
  flex-direction: column;
}
.today-tally .muted {
  color: #a9c9b8;
}
.today-tally b {
  font: 700 1.25rem/1.2 var(--display);
  font-variant-numeric: tabular-nums;
}
.today-tally .btn {
  margin-left: auto;
  color: var(--gold);
}
.today-tally .btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}
.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 6px 6px 14px;
  margin-bottom: 18px;
}
.big-search:focus-within {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(46, 154, 107, 0.18);
}
.big-search .i {
  color: var(--muted);
}
.big-search input[type="search"] {
  border: 0;
  box-shadow: none;
  padding: 10px 4px;
  font-size: 1.05rem;
  min-height: 48px;
}
.big-search input[type="search"]:focus {
  box-shadow: none;
}
.big-search .btn {
  min-height: 48px;
}
.client-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.client-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.client-result:hover {
  border-color: var(--green-500);
  color: inherit;
}
.cr-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cr-main strong {
  font-size: 1.02rem;
}
.cr-due {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.cr-due b {
  font-family: var(--display);
  font-size: 1.08rem;
}
.collect-card + .collect-card {
  margin-top: 18px;
}
.owed {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.owed > div {
  display: flex;
  flex-direction: column;
}
.owed b {
  font: 700 1.3rem/1.2 var(--display);
  font-variant-numeric: tabular-nums;
}
.red {
  color: var(--red);
}
.due-lines {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.due-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.collect-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.input-xl > input {
  font: 700 1.4rem/1.2 var(--display);
  min-height: 54px;
  font-variant-numeric: tabular-nums;
}
.method-pick legend {
  margin-bottom: 6px;
}
.segmented-lg {
  display: flex;
  width: 100%;
}
.segmented-lg label {
  flex: 1;
}
.segmented-lg span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  font-size: 0.98rem;
}
.needs-file .file-drop {
  border-color: var(--red);
  background: var(--red-50);
}
.btn-lg {
  min-height: 52px;
  font-size: 1.02rem;
}
.done-card {
  max-width: 480px;
  margin: 10px auto 0;
  text-align: center;
  padding: 30px 22px;
}
.done-card .stamp {
  margin-bottom: 14px;
}
.done-amount {
  font: 800 2.6rem/1.1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.done-who {
  margin: 6px 0 16px;
  color: var(--muted);
}
.facts-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  text-align: left;
}
.facts-inline div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.facts-inline dt {
  font-size: 0.78rem;
  color: var(--muted);
}
.facts-inline dd {
  margin: 0;
  font-weight: 700;
}

/* ---------- Cuadres ---------- */
.kpis.kpis-3 {
  grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
}
.closing-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.closing-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.closing-amounts {
  display: flex;
  gap: 22px;
}
.closing-amounts > div {
  display: flex;
  flex-direction: column;
}
.closing-amounts b {
  font-family: var(--display);
  font-size: 1.05rem;
}
.closing-state {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.badge-btn {
  border: 0;
  cursor: pointer;
  font-family: var(--body);
}

/* ---------- Planes ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.plan-grid .panel + .panel {
  margin-top: 0;
}
.plan-card.is-premium {
  border-color: var(--gold);
  box-shadow: inset 0 4px 0 var(--gold);
}
.plan-card.is-current {
  border-color: var(--green-700);
  box-shadow: inset 0 4px 0 var(--green-700);
}
.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.plan-head h2 {
  margin: 0;
}
.plan-price {
  margin: 8px 0 14px;
}
.plan-amount {
  font: 800 2.2rem/1 var(--display);
  letter-spacing: -0.02em;
}
.plan-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.plan-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.93rem;
}
.plan-list .i {
  color: var(--green-700);
  margin-top: 1px;
}
.paypal-box {
  max-width: 420px;
}

/* ---------- Impresión ---------- */
@media print {
  .sidebar,
  .mobilebar,
  .bottomnav,
  .trial-strip,
  .no-print,
  .btn {
    display: none !important;
  }
  .app {
    display: block;
  }
  body {
    background: #fff;
  }
  .panel {
    border: 0;
    padding: 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi:nth-child(3) {
    border-left: 0;
  }
  .kpi:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 960px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .sticky {
    position: static;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 15px;
  }
  .app {
    display: block;
    padding-bottom: 72px;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    z-index: 60;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }
  .nav-open .sidebar {
    transform: none;
  }
  .scrim {
    position: fixed;
    inset: 0;
    background: rgba(11, 46, 34, 0.45);
    z-index: 55;
    display: none;
  }
  .nav-open .scrim {
    display: block;
  }
  .mobilebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--green-950);
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .mobilebar .brand {
    padding: 0;
    font-size: 1.05rem;
  }
  .mobilebar .icon-btn {
    color: #fff;
  }
  .bottomnav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a,
  .bottomnav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font: 600 0.7rem/1.2 var(--body);
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
  }
  .bottomnav .active {
    color: var(--green-800);
  }
  .bottomnav .active .i {
    color: var(--green-700);
  }
  .topbar {
    margin-bottom: 16px;
  }
  .topbar h1 {
    font-size: 1.45rem;
  }
  .content {
    padding: 18px 16px 32px;
  }
  .trial-strip {
    padding: 9px 16px;
  }
  .cols-even,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-2.keep {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel {
    padding: 16px;
  }
  .panel-flush > .panel-head {
    padding: 14px 16px 0;
  }
  .collect-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px;
  }
  .collect-item .collect-actions {
    justify-content: stretch;
  }
  .collect-actions .btn {
    flex: 1 1 auto;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fact:nth-child(3) {
    border-left: 0;
  }
  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .score {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Tablas como tarjetas */
  table.table.stack-sm thead {
    display: none;
  }
  table.table.stack-sm,
  table.table.stack-sm tbody,
  table.table.stack-sm tr,
  table.table.stack-sm td {
    display: block;
    width: 100%;
  }
  table.table.stack-sm tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  table.table.stack-sm td {
    border: 0;
    padding: 3px 0;
    text-align: left !important;
  }
  table.table.stack-sm td[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--muted);
    font-size: 0.82rem;
  }
  .ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-grid,
  .split,
  .price,
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    padding-bottom: 8px;
  }
  .hero-card .ledger {
    grid-template-columns: repeat(3, 1fr);
  }
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature,
  .feature + .feature {
    padding: 18px 0;
    border-left: 0;
  }
  .site-links .hide-sm {
    display: none;
  }
  .lender-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .lender-row .lender-cta {
    grid-column: 1 / -1;
  }
  .lender-logo {
    width: 56px;
    height: 56px;
  }
  .auth-side {
    padding: 24px 20px;
  }
  .auth-side .auth-extra {
    display: none;
  }
  .price {
    padding: 24px;
  }
  .section {
    padding: 52px 0;
  }
}

@media (max-width: 600px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi {
    padding: 14px 16px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .kpi:first-child,
  .kpi:nth-child(4) {
    grid-column: 1 / -1;
  }
  .kpi:first-child {
    border-top: 0;
  }
  .kpi:nth-child(3) {
    border-left: 1px solid var(--line);
  }
  .kpi .k-value {
    font-size: 1.2rem;
  }
  .kpi:first-child .k-value {
    font-size: 1.75rem;
  }
  .topbar .btn-row {
    width: 100%;
  }
  .topbar .btn-row .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Equipo, cobrador y cuadres en pantallas chicas ---------- */
@media (max-width: 1100px) {
  .kpis.kpis-3 {
    grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  }
  .kpis-3 .kpi:nth-child(3) {
    border-left: 1px solid var(--line);
    border-top: 0;
  }
}
@media (max-width: 860px) {
  .plan-grid,
  .perm-grid-2,
  .cred-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .closing-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .closing-state {
    justify-content: space-between;
  }
}
@media (max-width: 600px) {
  .kpis.kpis-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpis-3 .kpi:first-child {
    grid-column: 1 / -1;
  }
  .kpis-3 .kpi:nth-child(2) {
    border-left: 0;
  }
  .kpis-3 .kpi:nth-child(3) {
    border-top: 1px solid var(--line);
  }
  .client-result {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .client-result .avatar {
    display: none;
  }
  .big-search {
    padding-left: 10px;
  }
  .big-search .i {
    display: none;
  }
  .today-tally .btn {
    margin-left: 0;
  }
  .recovery-codes {
    grid-template-columns: minmax(0, 1fr);
  }
  .due-lines li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .due-lines li .small {
    grid-column: 1;
    grid-row: 2;
  }
  .done-amount {
    font-size: 2.2rem;
  }
}
