/* Préstamos PA — Simulador Público */
#ppa-sim-app {
  --sg: #256b52;          /* dark green */
  --sg-m: #2d5a3d;        /* mid green */
  --sg-l: #e8f5ee;        /* light green bg */
  --sg-b: #c5e8d3;        /* green border */
  --cream: #f6f5f0;       /* warm cream bg */
  --cream2: #e8e3d8;      /* darker cream */
  --gold: #c9973a;        /* golden CTA */
  --gold-l: #fdf3e3;      /* gold light bg */
  --teal: #d4ede8;        /* table header */
  --teal-l: #e8f5f2;      /* table last row */
  --white: #ffffff;
  --text: #1a1a1a;
  --text2: #6b7280;
  --text3: #9ca3af;
  --bdr: #e5e0d8;
  --red: #ef4444;
  --shad: 0 2px 16px rgba(0,0,0,.07);
  --r: 16px;
  --r-sm: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cream);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#ppa-sim-app *, #ppa-sim-app *::before, #ppa-sim-app *::after { box-sizing: border-box; }
#ppa-sim-app button {
    font-family: inherit;
    background: #ffffff;
    border: 2px solid #e5e5df;
    border-radius: 12px;
    padding: 16px 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
#ppa-sim-app button.act {
    border-color: #1b4d3e;
    background: #dceee7;
    color: #1b4d3e;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.12);
    animation: pop .3s ease;
}

body .sim-stepper .sim-step-btn  {
      width: 60px;
    height: 60px;
    border-radius: 50% !important;
    border: 2px solid #e5e5df;
    background: #ffffff;
    font-size: 30px;
    font-weight: 700;
    color: #1b4d3e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    user-select: none;
    line-height: 1;
}


body .sim-stepper .sim-step-btn:active,
body .sim-stepper .sim-step-btn:focus{
    transform: scale(0.9);
    background: #dceee7 !important;
}
div#simCalPrev {
background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(27, 77, 62, 0.07), 0 6px 20px rgba(27, 77, 62, 0.05);
    border-radius: 12px !important;
    border: 1px solid var(--bdr);
}
button#simNext1 {
    background: #1b4d3e;
    color: #fff;
    box-shadow: 0 3px 10px rgba(27, 77, 62, 0.2);
}
button#simNext1:active {
    background: #163e32;
    transform: scale(0.96);
}
#ppa-sim-app input, #ppa-sim-app select { font-family: inherit; width: 100%;
    padding: 16px;
    border: 2px solid #e5e5df;
    border-radius: 12px;
    font-size: 16px;
    color: #2c2c2c;
    background: #ffffff;
    transition: all .2s;
    -webkit-appearance: none;}
#ppa-sim-app a { text-decoration: none; }
div#simCalPrev {
    background: #fff;
    border-radius: 12px;
}
button#simNext2 {
    background: #1b4d3e;
    color: #fff;
    box-shadow: 0 3px 10px rgba(27, 77, 62, 0.2);
        flex: 2 !important;
}
button#simBack2 {
    background: #e5e5df;
    color: #555550;
      flex: 1 ;
}
button#simGenerar {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 22px;
    background: linear-gradient(135deg, #D4A853, #E0B564)!important;
    color: #2C2215;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(212, 168, 83, 0.4);
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: .3px;
}
button#simBack3 {
    flex: 1;
    background: #e5e5df;
    color: #555550;
}
input#simSlider {
    padding: 0;
    background: #e5e5df;
}
input#simOtro {
    padding: 0;
    border: 0;
    line-height: 2;
}
/* old table rule removed — replaced by .sim-cal-tbl-wrap + .sim-cal-tbl below */
/* HEADER */
#sim-hdr {
  background: var(--sg);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
}
.sim-hdr-inner {
  max-width: 540px;
  margin: 0 auto;
  padding: 14px 20px 0;
}
#sim-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  text-align: center;
}
#sim-progress {
  display: flex;
  gap: 0;
}
.sp-item {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255,255,255,.4);
  padding-bottom: 10px;
  position: relative;
}
.sp-item.sp-active { color: #fff; font-weight: 800; }
.sp-item.sp-done { color: rgba(255,255,255,.7); }
.sp-bar {
  display: block;
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  margin: 0 4px 8px;
}
.sp-item.sp-active .sp-bar { background: #c9973a; }
.sp-item.sp-done .sp-bar { background: rgba(255,255,255,.6); }

/* BODY */
#sim-body {
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* NOTICE BOX */
.sim-notice {
  background: var(--gold-l);
  border: 1.5px solid #e8c57a;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #7a5a1a;
  font-weight: 500;
}
.sim-notice .sn-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.sim-notice strong { color: #5a3e0a; }

/* SECTION TITLES */
.sim-sh {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}
.sim-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}
.sim-sh2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--sg);
  margin-bottom: 14px;
}

/* AMOUNT GRID */
.sim-montos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.sim-monto-btn {
  background: var(--white);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-sm);
  padding: 12px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: all .15s;
}
.sim-monto-btn:hover { border-color: var(--sg-m); background: var(--sg-l); }
.sim-monto-btn.act {
  border-color: var(--sg);
  background: var(--sg-l);
  color: var(--sg);
  font-weight: 800;
}
.sim-otro-wrap {
  background: var(--white);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 6px;
  margin-bottom: 24px;
}
.sim-otro-wrap label { font-size: 14px; color: var(--text2); white-space: nowrap; }
.sim-otro-wrap input {
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  background: transparent;
}

/* MESES PICKER */
.sim-meses-sect { margin-bottom: 20px; }
.sim-stepper {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shad);
  margin-bottom: 14px;
}
.sim-stepper-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.sim-step-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--bdr);
  font-size: 22px;
  font-weight: 700;
  color: var(--sg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.sim-step-btn:hover { background: var(--sg-l); border-color: var(--sg); }
.sim-step-num {
  font-size: 52px;
  font-weight: 900;
  color: var(--sg);
  line-height: 1;
  min-width: 70px;
  text-align: center;
}
.sim-step-label { font-size: 16px; color: var(--text2); font-weight: 500; }
.sim-meses-slider {
  width: 100%;
  accent-color: var(--sg);
  height: 4px;
}
.sim-rapido-label { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.sim-rapido-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sim-rapido-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.sim-rapido-card:hover { border-color: var(--sg-m); }
.sim-rapido-card.act {
  border-color: var(--sg);
  background: var(--sg-l);
}
.sim-rapido-card .src-m { font-size: 10px; font-weight: 700; color: var(--text3); letter-spacing: .5px; text-transform: uppercase; }
.sim-rapido-card .src-c { font-size: 16px; font-weight: 800; color: var(--sg); margin: 2px 0; }
.sim-rapido-card.act .src-c { color: var(--sg); }
.sim-rapido-card .src-p { font-size: 10px; color: var(--text2); }
.src-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--white);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

/* RESULT BOX */
.sim-result-box {
  background: var(--sg);
  border-radius: var(--r);
  padding: 20px;
  color: #fff;
  margin-bottom: 14px;
}
.sim-rb-label { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.sim-rb-cuota { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; justify-content: center;}
.sim-rb-cuota .amount { font-size: 48px; font-weight: 900; line-height: 1; justify-content: center;}
.sim-rb-cuota .per { font-size: 14px; font-weight: 600; color: #c9973a; justify-content: center;}
.sim-rb-dia { font-size: 12px; opacity: .7; margin-bottom: 16px; font-style: italic; }
.sim-rb-rows { display: flex; flex-direction: column; gap: 6px; }
.sim-rb-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.sim-rb-row .rr-label { opacity: .7; }
.sim-rb-row .rr-val { font-weight: 700; }
.sim-rb-row.big .rr-label { font-weight: 700; opacity: 1; font-size: 15px; }
.sim-rb-row.big .rr-val { font-size: 20px; font-weight: 900; }
.sim-result-box .sim-rb-label{text-align: center;}
div#rbDia {    text-align: center;}
/* PROMO BADGE */
.sim-promo {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
}
.sim-promo-icon { flex-shrink: 0; opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   CALENDARIO DE PAGOS — mobile-first
   Base ≤479px  →  480px+  →  540px+
   En 375px, padding 16px/lado → 343px disponibles
   Columnas fijas: N°34 + CUOTA76 + SALDO80 = 190px → FECHA recibe 153px
═══════════════════════════════════════════════════════════════ */

.sim-cal-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text2);
    margin: 0 0 8px;
}
@media (min-width: 480px) {
    .sim-cal-title { font-size: 11px; margin-bottom: 10px; }
}

/* Wrapper: clipping para border-radius de la tabla */
.sim-cal-tbl-wrap {
    overflow: hidden;
    border: 1px solid var(--bdr);
    background: var(--white);
}

/* Tabla */
.sim-cal-tbl {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Anchos columnas — mobile base */
.sim-cal-tbl col.col-n     { width: 34px; }
.sim-cal-tbl col.col-fecha { width: auto; }
.sim-cal-tbl col.col-cuota { width: 76px; }
.sim-cal-tbl col.col-saldo { width: 80px; }

@media (min-width: 480px) {
    .sim-cal-tbl col.col-n     { width: 44px; }
    .sim-cal-tbl col.col-cuota { width: 90px; }
    .sim-cal-tbl col.col-saldo { width: 96px; }
}

/* Cabecera */
.sim-cal-tbl thead tr           { background: var(--teal-l); }
.sim-cal-tbl thead th {
    padding: 8px 9px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--sg-m);
    text-align: left;
    border-bottom: 1px solid var(--bdr);
    white-space: nowrap;
}
@media (min-width: 480px) {
    .sim-cal-tbl thead th { padding: 10px 14px; font-size: 10px; letter-spacing: .8px; }
}

/* Alineaciones — fijas en todos los breakpoints */
.sim-cal-tbl th.col-n,
.sim-cal-tbl td.cal-n            { text-align: center; }
.sim-cal-tbl th.col-cuota,
.sim-cal-tbl td.cal-cuota        { text-align: right; }
.sim-cal-tbl th.col-saldo,
.sim-cal-tbl td.cal-saldo,
.sim-cal-tbl td.cal-saldo-final  { text-align: right; }

/* Filas normales */
.sim-cal-tbl tbody tr            { border-bottom: 1px solid var(--bdr); }
.sim-cal-tbl tbody tr:last-child { border-bottom: none; }

.sim-cal-tbl tbody td {
    padding: 9px 9px;
    font-size: 12px;
    color: var(--text);
    background: transparent;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 480px) {
    .sim-cal-tbl tbody td { padding: 10px 14px; font-size: 13px; }
}

.sim-cal-tbl tbody td.cal-n {
    font-size: 11px;
    color: var(--text3);
}
@media (min-width: 480px) {
    .sim-cal-tbl tbody td.cal-n { font-size: 12px; }
}

.sim-cal-tbl tbody td.cal-cuota { color: var(--sg-m); font-weight: 700; }
.sim-cal-tbl tbody td.cal-saldo { color: var(--text2); }

/* Fila final */
.sim-cal-tbl tbody tr.cal-last {
    background: var(--teal-l);
    border-top: 1px solid var(--bdr);
    border-bottom: none;
}
.sim-cal-tbl tbody tr.cal-last td {
    font-weight: 700;
    color: var(--sg-m);
    padding-top: 11px;
    padding-bottom: 11px;
}
@media (min-width: 480px) {
    .sim-cal-tbl tbody tr.cal-last td { padding-top: 13px; padding-bottom: 13px; }
}

.sim-cal-tbl tbody tr.cal-last td.cal-saldo-final {
    color: #c9973a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2px;
        padding: 0;
}
@media (min-width: 480px) {
    .sim-cal-tbl tbody tr.cal-last td.cal-saldo-final { font-size: 14px; }
}

/* Botón expandir — texto subrayado limpio, sin caja, sin fondo */
#ppa-sim-app .cal-expand {
    text-align: center;

    background: transparent;
    border: none;
    box-shadow: none;
}
#ppa-sim-app .cal-expand-btn {
    display: inline-block;
    box-shadow: none !important;
    margin: 0;
    color: var(--sg-m);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
    border-radius: 0 !important;
    width: 100% !important;
    padding: 14px 16px;
    background: #e7f4f1;
    border-top: 0;
}
#ppa-sim-app .cal-expand-btn:hover  { opacity: .7;  }
#ppa-sim-app .cal-expand-btn:active { opacity: .5; transform: none; }
/* ═══════════════════════════════════════════════════════════════ */

/* BUTTONS */
.sim-btn-pri {
  width: 100%;
  background: var(--sg);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 16px;
  border-radius: 50px;
  text-align: center;
  transition: all .15s;
  letter-spacing: .3px;
}
.sim-btn-pri:hover { background: var(--sg-m); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,56,38,.3); }
.sim-btn-sec {
  width: 100%;
  background: var(--cream2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  border-radius: 50px;
  text-align: center;
  border: none;
  margin-top: 10px;
  transition: all .15s;
}
.sim-btn-sec:hover { background: var(--bdr); }
.sim-btn-gold {
  width: 100%;
  background: var(--gold);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 18px;
  border-radius: var(--r-sm);
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .15s;
  box-shadow: 0 4px 16px rgba(201,151,58,.4);
}
.sim-btn-gold:hover { background: #b8852e; transform: translateY(-1px); }
.sim-btn-gold.loading { opacity: .7; pointer-events: none; }
.sim-btn-back {
  background: var(--cream2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 50px;
  border: none;
  transition: all .15s;
}
.sim-btn-back:hover { background: var(--bdr); }
.sim-btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }

/* STEP 2 FORM */
.sim-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shad);
  margin-bottom: 14px;
}
.sim-privacy {
  background: var(--gold-l);
  border: 1px solid #e8c57a;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: #7a5a1a;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.sim-fg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.sim-fg:last-child { margin-bottom: 0; }
.sim-fg label { font-size: 12px; font-weight: 600; color: var(--text2); }
.sim-fg input, .sim-fg select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e5df;
    border-radius: var(--r-sm);
    font-size: 16px;
    color: var(--text);
    background: var(--white);
    transition: all .2s;
    -webkit-appearance: none;
}
.sim-fg input:focus, .sim-fg select:focus { outline: none; border-color: var(--sg); background: #fff; }
.sim-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sim-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* TOGGLE BUTTONS */
.sim-toggle-group { display: flex; gap: 8px; }
.sim-toggle {
  flex: 1;
  background: var(--cream);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.sim-toggle.act { background: var(--sg-l); border-color: var(--sg); color: var(--sg); font-weight: 800; }
.sim-toggle:hover:not(.act) { border-color: var(--sg-m); }

/* STEP 3 CONFIRM */
.sim-conf-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shad);
  overflow: hidden;
  margin-bottom: 14px;
}
.sim-conf-head {
  background: var(--teal);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sim-conf-head .ch-title { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--sg-m); }
.sim-conf-head .ch-edit { font-size: 11px; font-weight: 700; color: var(--sg); cursor: pointer; }
.sim-conf-body { padding: 16px; }
.sim-conf-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--bdr); font-size: 13px; }
.sim-conf-row:last-child { border-bottom: none; }
.sim-conf-row .cr-lbl { color: var(--text2); }
.sim-conf-row .cr-val { font-weight: 600; color: var(--text); text-align: right; }
.sim-conf-row.big .cr-lbl { font-weight: 700; color: var(--text); font-size: 15px; }
.sim-conf-row.big .cr-val { font-size: 22px; font-weight: 900; color: var(--sg); }
.sim-conf-row.cuota .cr-val { color: var(--sg); font-weight: 800; font-size: 16px; }

.sim-gen-note { font-size: 11px; color: var(--text3); text-align: center; margin-top: 6px; }
.sim-error { color: var(--red); font-size: 13px; text-align: center; padding: 8px; background: #fef2f2; border-radius: var(--r-sm); margin-top: 8px; }

/* PAGARÉ HEADER (step 4) */
.sim-pagare-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
}
.spag-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.spag-btn {
  background: rgba(255,255,255,.13) !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.spag-btn.spag-pdf {
  background: rgba(201,151,58,.85) !important;
  border-color: transparent !important;
}

/* PAGARÉ DOCUMENT (inline) */
#pagare-doc {
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shad);
  padding: 28px 24px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  color: #111;
  line-height: 1.75;
  margin-bottom: 20px;
}
.pag-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 18px;
  color: #444;
}
#pagare-doc p {
  margin: 0 0 14px;
  text-align: justify;
}
#pagare-doc strong { font-weight: 700; }
#pagare-doc .pag-clause strong { margin-right: 4px; }
.pag-sig-wrap {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 50px;
}
.pag-sig {
  flex: 1;
  text-align: center;
  border-top: 1.5px solid #333;
  padding-top: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.pag-sig strong { display: block; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   RATES CONFIG FAB + PANEL (step 1 only)
═══════════════════════════════════════════════════════════ */
/* El header necesita ser el contenedor del FAB */
#sim-hdr { position: relative; }

.sim-rates-fab {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  z-index: 10;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.15) !important;
  border: 1.5px solid rgba(255,255,255,.35) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .25s !important;
  line-height: 1;
}
.sim-rates-fab:hover {
  background: rgba(255,255,255,.26) !important;
  transform: translateY(-50%) rotate(55deg);
}
.sim-rates-fab:active {
  transform: translateY(-50%) rotate(90deg) scale(.9);
}

#ppa-rates-panel {
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 4px 24px rgba(0,0,0,.14);
  padding: 16px;
  margin-bottom: 14px;
  border: 1.5px solid var(--sg-b);
}
.rp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.rp-title { font-size: 13px; font-weight: 700; color: var(--sg); }
.rp-close {
  background: var(--cream2) !important;
  border: none !important;
  color: var(--text2) !important;
  font-size: 13px !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.rp-section { margin-bottom: 12px; }
.rp-section:last-child { margin-bottom: 0; }
.rp-label { font-size: 11px; font-weight: 700; color: var(--text2); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.rpanel-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.rpanel-opt {
  flex: 0 0 auto;
  background: var(--cream) !important;
  border: 1.5px solid var(--bdr) !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all .15s !important;
}
.rpanel-opt.act {
  background: var(--sg-l) !important;
  border-color: var(--sg) !important;
  color: var(--sg) !important;
}
.rpanel-opt:hover:not(.act) { border-color: var(--sg-m) !important; }

/* ═══════════════════════════════════════════════════════════
   PWA — OFFLINE BANNER
═══════════════════════════════════════════════════════════ */
#ppa-conn-banner {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #92400e;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
#ppa-conn-banner .pcb-icon { font-size: 16px; flex-shrink: 0; }

/* PWA — SYNC BADGE */
#ppa-sync-badge {
  background: #fff8e1;
  border-bottom: 1.5px solid #f59e0b;
  color: #92400e;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.psb-dot {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  flex-shrink: 0;
  animation: psb-blink 1.4s infinite;
}
@keyframes psb-blink { 0%,100%{opacity:1} 50%{opacity:.35} }

/* PWA — INSTALL BUTTON */
#ppa-install-btn {
  background: var(--sg);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.15);
  width: 100%;
  text-align: center;
}
#ppa-install-btn:active { background: var(--sg-m); }
#ppa-install-btn .pib-icon { font-size: 16px; }

/* PWA — TOAST */
#ppa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  text-overflow: ellipsis;
  overflow: hidden;
}

/* PRINT — solo muestra el pagaré */
@media print {
  body.ppa-printing > * { display: none !important; }
  body.ppa-printing #ppa-pagare-print { display: block !important; }
  #ppa-pagare-print {
    font-family: Georgia, serif;
    font-size: 13px;
    color: #000;
    padding: 10mm 15mm;
    line-height: 1.75;
  }
  #ppa-pagare-print p { text-align: justify; margin: 0 0 12px; }
  #ppa-pagare-print strong { font-weight: 700; }
  #ppa-pagare-print .pag-meta { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 11px; }
  #ppa-pagare-print .pag-sig-wrap { display: flex; justify-content: space-between; gap: 30px; margin-top: 50px; }
  #ppa-pagare-print .pag-sig { flex: 1; text-align: center; border-top: 1.5px solid #333; padding-top: 8px; font-size: 11px; }
  #ppa-pagare-print .pag-sig strong { display: block; font-weight: 700; }
}

/* ═══════════════════════════════════════════════════════════════
   TABLET VERTICAL (768px+) — misma estructura que el móvil, pero más
   grande y cómoda de tocar: columna de 720px, tipografía y controles
   escalados ~1.25×. Teléfonos (<768px) no se tocan.
   Los selectores llevan #ppa-sim-app para ganarle a las reglas base
   de botones/inputs, que también van con ID.
═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Cabecera y cuerpo: columna más ancha y más aire */
  #ppa-sim-app .sim-hdr-inner { max-width: 720px; padding: 20px 32px 0; }
  #ppa-sim-app #sim-brand     { font-size: 26px; margin-bottom: 16px; }
  #ppa-sim-app .sp-item       { font-size: 13px; letter-spacing: 1.4px; padding-bottom: 12px; }
  #ppa-sim-app .sp-bar        { height: 4px; margin: 0 6px 10px; }
  #ppa-sim-app .sim-rates-fab { width: 44px; height: 44px; right: 32px; }
  #ppa-sim-app #sim-body      { max-width: 720px; padding: 32px 32px 64px; }

  /* Títulos y textos de apoyo */
  #ppa-sim-app .sim-notice { font-size: 16px; padding: 16px 20px; margin-bottom: 28px; gap: 12px; }
  #ppa-sim-app .sim-notice .sn-icon { font-size: 20px; }
  #ppa-sim-app .sim-sh   { font-size: 30px; margin-bottom: 6px; }
  #ppa-sim-app .sim-sh2  { font-size: 22px; margin-bottom: 8px; }
  #ppa-sim-app .sim-sub  { font-size: 16px; margin-bottom: 22px; }

  /* Montos */
  #ppa-sim-app .sim-montos { gap: 14px; margin-bottom: 18px; }
  #ppa-sim-app .sim-monto-btn { padding: 22px 8px; font-size: 20px; border-radius: 14px; }
  #ppa-sim-app .sim-otro-wrap { padding: 14px 20px; gap: 10px; margin-bottom: 36px; border-radius: 14px; }
  #ppa-sim-app .sim-otro-wrap label { font-size: 18px; }
  #ppa-sim-app .sim-otro-wrap input,
  #ppa-sim-app input#simOtro { font-size: 22px; }

  /* Plazo: stepper y selección rápida */
  #ppa-sim-app .sim-stepper { padding: 32px; gap: 22px; border-radius: 20px; margin-bottom: 20px; }
  #ppa-sim-app .sim-stepper-row { gap: 36px; }
  #ppa-sim-app .sim-stepper .sim-step-btn { width: 76px; height: 76px; font-size: 38px; }
  #ppa-sim-app .sim-step-num   { font-size: 72px; min-width: 100px; }
  #ppa-sim-app .sim-step-label { font-size: 20px; }
  #ppa-sim-app .sim-meses-slider { height: 8px; }
  #ppa-sim-app .sim-error { font-size: 16px; padding: 12px; }
  #ppa-sim-app .sim-rapido-label { font-size: 15px; margin-bottom: 16px; }
  #ppa-sim-app .sim-rapido-grid { gap: 14px; }
  #ppa-sim-app .sim-rapido-card { padding: 20px 10px; border-radius: 14px; }
  #ppa-sim-app .sim-rapido-card .src-m { font-size: 13px; }
  #ppa-sim-app .sim-rapido-card .src-c { font-size: 24px; margin: 4px 0; }
  #ppa-sim-app .sim-rapido-card .src-p { font-size: 13px; }
  #ppa-sim-app .src-badge { font-size: 11px; padding: 3px 12px; top: -11px; }

  /* Caja de resultado */
  #ppa-sim-app .sim-result-box { padding: 32px 36px; border-radius: 20px; }
  #ppa-sim-app .sim-rb-label { font-size: 14px; margin-bottom: 10px; }
  #ppa-sim-app .sim-rb-cuota { gap: 10px; margin-bottom: 8px; }
  #ppa-sim-app .sim-rb-cuota .amount { font-size: 68px; }
  #ppa-sim-app .sim-rb-cuota .per { font-size: 18px; }
  #ppa-sim-app .sim-rb-dia { font-size: 16px; margin-bottom: 24px; }
  #ppa-sim-app .sim-rb-rows { gap: 10px; }
  #ppa-sim-app .sim-rb-row { font-size: 17px; }
  #ppa-sim-app .sim-rb-row.big .rr-label { font-size: 20px; }
  #ppa-sim-app .sim-rb-row.big .rr-val { font-size: 28px; }
  #ppa-sim-app .sim-promo { font-size: 15px; padding: 14px 18px; margin-top: 22px; gap: 10px; }

  /* Calendario de pagos */
  #ppa-sim-app .sim-cal-title { font-size: 14px; margin-bottom: 14px; letter-spacing: 1.6px; }
  #ppa-sim-app .sim-cal-tbl col.col-n     { width: 64px; }
  #ppa-sim-app .sim-cal-tbl col.col-cuota { width: 130px; }
  #ppa-sim-app .sim-cal-tbl col.col-saldo { width: 140px; }
  #ppa-sim-app .sim-cal-tbl thead th { padding: 14px 20px; font-size: 13px; }
  #ppa-sim-app .sim-cal-tbl tbody td { padding: 15px 20px; font-size: 17px; }
  #ppa-sim-app .sim-cal-tbl tbody td.cal-n { font-size: 15px; }
  #ppa-sim-app .sim-cal-tbl tbody tr.cal-last td { padding-top: 18px; padding-bottom: 18px; }
  #ppa-sim-app .sim-cal-tbl tbody tr.cal-last td.cal-saldo-final { font-size: 18px; }
  #ppa-sim-app .cal-expand-btn { font-size: 16px; padding: 18px 20px; }

  /* Botones principales */
  #ppa-sim-app button.sim-btn-pri,
  #ppa-sim-app button#simNext1,
  #ppa-sim-app button#simNext2 { font-size: 20px; padding: 22px; }
  #ppa-sim-app button#simBack2,
  #ppa-sim-app button#simBack3 { font-size: 18px; padding: 22px 12px; }
  #ppa-sim-app button#simGenerar { font-size: 22px; padding: 26px; margin-top: 36px; border-radius: 18px; }
  #ppa-sim-app .sim-btn-row { gap: 16px; margin-top: 24px; }
  #ppa-sim-app .sim-btn-back { font-size: 17px; padding: 16px 32px; }

  /* Paso 2: formulario */
  #ppa-sim-app .sim-card { padding: 32px; border-radius: 20px; margin-bottom: 20px; }
  #ppa-sim-app .sim-privacy { font-size: 15px; padding: 16px 20px; margin-bottom: 24px; }
  #ppa-sim-app .sim-fg { gap: 8px; margin-bottom: 22px; }
  #ppa-sim-app .sim-fg label { font-size: 15px; }
  #ppa-sim-app .sim-fg input,
  #ppa-sim-app .sim-fg select { padding: 20px; font-size: 19px; }
  #ppa-sim-app .sim-grid2, #ppa-sim-app .sim-grid3 { gap: 16px; }
  #ppa-sim-app .sim-toggle-group { gap: 12px; }
  #ppa-sim-app .sim-toggle { padding: 18px 12px; font-size: 18px; }

  /* Paso 3: confirmación */
  #ppa-sim-app .sim-conf-card { border-radius: 20px; margin-bottom: 20px; }
  #ppa-sim-app .sim-conf-head { padding: 14px 24px; }
  #ppa-sim-app .sim-conf-head .ch-title { font-size: 13px; }
  #ppa-sim-app .sim-conf-head .ch-edit { font-size: 15px; }
  #ppa-sim-app .sim-conf-body { padding: 22px 24px; }
  #ppa-sim-app .sim-conf-row { font-size: 17px; padding: 11px 0; }
  #ppa-sim-app .sim-conf-row.big .cr-lbl { font-size: 20px; }
  #ppa-sim-app .sim-conf-row.big .cr-val { font-size: 30px; }
  #ppa-sim-app .sim-conf-row.cuota .cr-val { font-size: 21px; }
  #ppa-sim-app .sim-gen-note { font-size: 14px; margin-top: 10px; }

  /* Pagaré (paso 4) */
  #ppa-sim-app .spag-title { font-size: 19px; }
  #ppa-sim-app .spag-btn { font-size: 16px !important; padding: 12px 22px !important; }
  #ppa-sim-app #pagare-doc { font-size: 16px; padding: 44px 48px; }
  #ppa-sim-app .pag-meta, #ppa-sim-app .pag-sig { font-size: 15px; }

  /* Panel ⚙ de tasas / gasto administrativo */
  #ppa-sim-app #ppa-rates-panel { padding: 24px; border-radius: 20px; margin-bottom: 20px; }
  #ppa-sim-app .rp-title { font-size: 17px; }
  #ppa-sim-app .rp-label { font-size: 14px; margin-bottom: 12px; }
  #ppa-sim-app .rp-section { margin-bottom: 18px; }
  #ppa-sim-app .rpanel-opts { gap: 10px; }
  #ppa-sim-app .rpanel-opt { font-size: 18px !important; padding: 12px 22px !important; }
  #ppa-sim-app .rp-close { width: 38px !important; height: 38px !important; font-size: 16px !important; }
}
