/* ─────────────────────────────────────────
   styles.css — Sistema de diseño Neto
───────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --bg:        #f0f2f7;
  --surface:   #ffffff;
  --surface2:  #f7f8fc;
  --border:    #eaecf4;
  --dark:      #1a1f2e;
  --dark2:     #252d40;
  --dark3:     #3a4560;
  --text:      #1a1f2e;
  --text2:     #4a5568;
  --text3:     #8892a8;
  --green:     #16a34a;
  --green-bg:  #e8f8f0;
  --red:       #e53e3e;
  --red-bg:    #feeef2;
  --blue:      #2563eb;
  --blue-bg:   #e8f0ff;
  --purple:    #7c3aed;
  --purple-bg: #f0eeff;
  --amber:     #d97706;
  --amber-bg:  #fff4e0;
  --teal:      #0d9488;
  --teal-bg:   #e0f7f5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding-bottom: 90px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Animations ── */
@keyframes slideUp   { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn    { from { opacity: 0; transform: translateY(6px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes shake     { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(229,62,62,.6); } 70% { box-shadow: 0 0 0 6px rgba(229,62,62,0); } 100% { box-shadow: 0 0 0 0 rgba(229,62,62,0); } }
@keyframes sweep     { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.slide-up { animation: slideUp .35s cubic-bezier(.16,1,.3,1) forwards; }

/* ── Visibilidad ── */
.hidden { display: none !important; }

/* ── Privacy blur ── */
.blurred { filter: blur(8px); transition: filter .2s; }

/* ════════════════════════════════
   HEADER
════════════════════════════════ */
#appHeader {
  background: var(--dark);
  position: sticky; top: 0; z-index: 20;
  padding: 14px 18px 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.header-left { display: flex; align-items: center; gap: 10px; }

.app-logo {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
  transition: background .25s;
}
.app-logo-personal { background: #2dd4bf; color: #0a2421; }
.app-logo-negocio  { background: #818cf8; color: #1e1b4b; }

#appTitle { font-size: 14px; font-weight: 700; color: #8892a8; }

#welcomeUser { font-size: 13px; font-weight: 700; color: #fff; }
#welcomeQuote { font-size: 10px; color: #5a6480; font-style: italic; }

.header-icons { display: flex; gap: 8px; }
.header-icon {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--dark2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: #c8cfe0;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.header-icon:active { background: var(--dark3); color: #fff; }

/* Notif dot */
.notif-dot {
  display: none;
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--dark);
}
.notif-dot.active {
  display: block;
  animation: pulse-dot 2s infinite;
}

/* ── Mode switch ── */
.mode-switch {
  display: flex;
  background: var(--dark2);
  border-radius: 12px;
  padding: 4px; gap: 4px;
  margin-bottom: 12px;
  position: relative;
}
#switchBg {
  position: absolute;
  top: 4px; bottom: 4px;
  width: calc(50% - 4px);
  background: var(--surface);
  border-radius: 9px;
  transition: left .25s cubic-bezier(.16,1,.3,1);
  left: 4px;
}
.mode-tab {
  flex: 1; position: relative; z-index: 1;
  padding: 8px 4px;
  font-size: 11px; font-weight: 800;
  text-align: center; cursor: pointer;
  background: transparent; border: none; outline: none;
  font-family: inherit;
  letter-spacing: .3px;
  transition: color .2s;
  text-transform: uppercase;
}
.mode-tab-on.mode-tab-personal { color: var(--teal); }
.mode-tab-on.mode-tab-negocio  { color: var(--purple); }
.mode-tab-off { color: #5a6480; }

/* ── Nav mes ── */
.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
}
.month-nav-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--dark2);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; border: none; outline: none;
  font-family: inherit;
}
.month-nav-pill:active { background: var(--dark3); }
.nav-arr { color: #5a6480; font-size: 14px; }
#labelMonth { font-size: 13px; font-weight: 800; letter-spacing: .5px; }

/* ── Trial banner ── */
#trialBanner {
  background: var(--amber-bg);
  border-top: 1px solid #fde68a;
  padding: 8px 18px;
  font-size: 11px; font-weight: 600; color: var(--amber);
  text-align: center;
}
#trialBanner button { color: var(--amber); font-weight: 800; background: none; border: none; cursor: pointer; font-family: inherit; }
#trialBanner.hidden { display: none; }

/* ════════════════════════════════
   MAIN BODY
════════════════════════════════ */
main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ── Balance card ── */
.balance-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  background: var(--surface);
  transition: border-color .25s;
}
.balance-card-personal { border-left: 4px solid #2dd4bf; }
.balance-card-negocio  { border-left: 4px solid #818cf8; }

.bal-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .8px;
}
.bal-top-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
#displayMain {
  font-size: 42px; font-weight: 800; color: var(--text);
  letter-spacing: -2px; line-height: 1;
  margin: 4px 0 14px;
  transition: filter .2s;
}

.progress-bar-track {
  background: #eef0f7;
  border-radius: 5px; height: 6px;
  overflow: hidden; margin-bottom: 10px;
}
.progress-bar {
  height: 100%; border-radius: 5px;
  transition: background .4s;
}
.progress-bar-ok  { background: #2dd4bf; }
.progress-bar-neg { background: var(--red); }

.bal-footer { display: flex; justify-content: space-between; align-items: center; }
.bal-footer-label { font-size: 11px; color: var(--text3); font-weight: 600; }
#todaySpent { font-size: 13px; font-weight: 800; color: var(--red); }

/* Saldos tarjetas débito bajo la card */
#debitBalancesRow { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.debit-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.debit-row-label  { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.debit-manage-btn { font-size: 10px; font-weight: 700; color: var(--blue); background: none; border: none; cursor: pointer; font-family: inherit; }
#debitBalancesList { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip-balance {
  display: flex; flex-direction: column;
  border-radius: 10px; padding: 8px 12px;
  cursor: pointer; flex-shrink: 0;
}
.chip-balance-ok  { background: var(--green-bg); }
.chip-balance-neg { background: var(--red-bg); }
.chip-balance-name { font-size: 9px; font-weight: 600; color: var(--text3); }
.chip-balance-val  { font-size: 13px; font-weight: 800; color: var(--green); }
.chip-balance-neg .chip-balance-val { color: var(--red); }

/* ── Stats grid ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.stat-lbl { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 5px; }
.stat-val { font-size: 18px; font-weight: 800; }
.val-green { color: var(--green); }
.val-red   { color: var(--red); }
.val-amber { color: var(--amber); }
.val-blue  { color: var(--blue); }
.stat-divider { height: 1px; background: var(--border); margin: 8px 0; }
.reserva-val { font-size: 14px; font-weight: 800; }
.reserva-val-warn { color: var(--amber); }
.reserva-val-ok   { color: var(--text3); }

.pending-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  border-left: 3px solid #fbbf24;
}
.pending-row { display: flex; justify-content: space-between; align-items: center; }
.pending-label { font-size: 10px; font-weight: 700; color: var(--text3); }

/* ── Movimientos ── */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-title  { font-size: 14px; font-weight: 800; color: var(--text); }

.tx-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.tx-item-pending { opacity: .7; background: #f7f8fc; }
.tx-left  { display: flex; align-items: center; gap: 10px; }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tx-ico {
  width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; font-weight: 700;
}
.tx-ico-inc { background: var(--green-bg); color: var(--green); }
.tx-ico-exp { background: var(--red-bg);   color: var(--red);   }
.tx-info .tx-desc  { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tx-info .tx-meta  { font-size: 9px;  font-weight: 600; color: var(--text3); margin-top: 2px; }
.tx-method { font-size: 9px; color: var(--text3); }
.tx-amount { font-size: 13px; font-weight: 800; }
.tx-actions { display: flex; gap: 8px; align-items: center; }
.btn-icon-xs { font-size: 11px; background: none; border: none; cursor: pointer; padding: 2px; }
.btn-danger-xs { color: var(--red); }
.btn-apply-sm {
  font-size: 9px; font-weight: 800; color: #fff;
  background: var(--blue); border: none; border-radius: 6px;
  padding: 4px 8px; cursor: pointer; font-family: inherit;
}

.empty-txs { text-align: center; padding: 32px 16px; color: var(--text3); font-size: 13px; }

/* ════════════════════════════════
   BOTTOM NAV
════════════════════════════════ */
#bottomNav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 0 16px;
  z-index: 20;
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 2px 0;
}
.bnav-item-icon {
  width: 28px; height: 28px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.bnav-item-label {
  font-size: 9px; font-weight: 700; color: var(--text3);
  letter-spacing: .3px; text-transform: uppercase;
}
.bnav-item-active .bnav-item-icon  { background: var(--dark); }
.bnav-item-active .bnav-item-label { color: var(--dark); }
.bnav-fab-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; margin-top: -20px;
}
.fab {
  width: 52px; height: 52px;
  border-radius: 18px;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; font-weight: 700;
  box-shadow: 0 8px 28px rgba(26,31,46,.3);
  cursor: pointer; border: none; outline: none;
  transition: transform .1s;
}
.fab:active { transform: scale(.93); }
.fab-negocio { background: #818cf8; box-shadow: 0 8px 28px rgba(129,140,248,.35); }

/* ════════════════════════════════
   BADGES
════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .2px;
  text-transform: uppercase;
}
.badge-personal { background: var(--teal-bg);   color: var(--teal); }
.badge-negocio  { background: var(--purple-bg);  color: var(--purple); }
.badge-trial    { background: var(--amber-bg);   color: var(--amber); }
.badge-premium  { background: var(--purple-bg);  color: var(--purple); }
.badge-expired  { background: var(--red-bg);     color: var(--red); }
.badge-prog     { background: var(--blue-bg);    color: var(--blue); font-size: 9px; }
.badge-msi      { background: var(--purple-bg);  color: var(--purple); font-size: 9px; }
.badge-amber    { background: var(--amber-bg);   color: var(--amber); }

/* ════════════════════════════════
   MODALS
════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-sheet {
  position: relative;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  max-height: 92vh;
  overflow-y: auto;
  width: 100%;
  align-self: flex-end;
}
.modal-center {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  align-self: center;
}
.sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.sheet-title { font-size: 16px; font-weight: 800; color: var(--text); }
.sheet-sub   { font-size: 10px; color: var(--text3); margin-top: 2px; }
.sheet-body  { padding: 14px 18px 28px; display: flex; flex-direction: column; gap: 10px; }
.btn-close {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--surface2); border: none; cursor: pointer;
  font-size: 13px; color: var(--text3); display: flex; align-items: center; justify-content: center;
}

/* ── Formulario agregar movimiento ── */
.modal-form-header {
  background: var(--dark);
  padding: 16px 18px 18px;
}
.modal-form-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.modal-title { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.modal-title-inc        { color: #2dd4bf; }
.modal-title-exp        { color: var(--red); }
.modal-title-biz-inc    { color: #818cf8; }
.modal-title-biz-exp    { color: #f472b6; }
.modal-subtitle         { font-size: 10px; color: #5a6480; margin-top: 2px; }

.type-toggle { display: flex; background: var(--dark2); border-radius: 12px; padding: 4px; gap: 4px; }
.type-toggle-btn {
  flex: 1; padding: 9px; text-align: center;
  font-size: 12px; font-weight: 800;
  border-radius: 9px; border: none; cursor: pointer;
  font-family: inherit; text-transform: uppercase;
  transition: all .15s;
}
.type-toggle-active-inc { background: var(--green-bg);   color: var(--green); }
.type-toggle-active-exp { background: var(--red-bg);     color: var(--red);   }
.type-toggle-inactive   { background: transparent; color: #5a6480; }

/* Campos del formulario */
.form-body  { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.form-field { background: var(--surface2); border-radius: var(--radius-md); padding: 12px 16px; }
.form-field-label { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.form-field-val   { font-size: 13px; font-weight: 700; color: var(--text); }
.form-amount-val  { font-size: 42px; font-weight: 800; color: var(--text); letter-spacing: -2px; line-height: 1; }

.n-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.n-input:focus { border-color: var(--dark); }
.n-input::placeholder { color: var(--text3); }
.n-input option { background: var(--surface2); }

.form-method { background: var(--blue-bg); }
.form-method .form-field-label { color: var(--blue); }
.form-method .n-input { background: transparent; border-color: transparent; color: var(--blue); font-weight: 700; }

.cutoff-info { background: var(--purple-bg); border-radius: var(--radius-md); padding: 10px 14px; font-size: 10px; color: var(--purple); }

.option-block { background: var(--surface2); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; }
.option-block-blue { border-color: #bfdbfe; background: var(--blue-bg); }
.check-row { display: flex; align-items: center; gap: 10px; }
.check-box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border); flex-shrink: 0; accent-color: var(--dark); }
.check-label-main { font-size: 12px; font-weight: 700; color: var(--text); }
.check-label-sub  { font-size: 9px; color: var(--text3); margin-top: 1px; }

.schedule-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #bfdbfe; }

.inline-info { margin-top: 6px; padding: 10px 14px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.inline-info-ok   { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.inline-info-warn { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.inline-info-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid #bfdbfe; }

/* ── Botones ── */
.btn-primary {
  width: 100%; background: var(--dark); color: #fff;
  border: none; border-radius: var(--radius-md);
  padding: 15px; font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: inherit; letter-spacing: .3px;
  transition: opacity .15s;
}
.btn-primary:active { opacity: .85; }
.btn-green    { background: #2dd4bf; color: #0a2421; }
.btn-purple   { background: #818cf8; color: #1e1b4b; }
.btn-danger   { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.btn-wa       { background: #25d366; color: #fff; display: block; text-align: center; padding: 12px; border-radius: var(--radius-md); font-weight: 800; text-decoration: none; }
.btn-apply    { width: 100%; background: var(--red); color: #fff; border: none; border-radius: 10px; padding: 10px; font-size: 11px; font-weight: 800; cursor: pointer; font-family: inherit; }
.btn-apply:active { opacity: .85; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 14px; }
.btn-blue   { color: var(--blue); }
.btn-danger-icon { color: var(--red); }

/* ── Modal: saldo negativo ── */
.modal-icon-danger {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--red-bg); display: flex; align-items: center;
  justify-content: center; font-size: 24px; margin: 0 auto 12px;
}
.modal-title-sm { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.modal-sub-sm   { font-size: 12px; color: var(--text2); margin-bottom: 16px; }
.info-box { background: var(--surface2); border-radius: 14px; padding: 14px; }
.info-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); padding: 4px 0; }
.info-row-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-weight: 700; }

/* ── Notificaciones ── */
.notif-item { border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.notif-item-expired { background: var(--red-bg); border-left: 4px solid var(--red); }
.notif-item-pending { background: var(--amber-bg); border-left: 4px solid var(--amber); }
.notif-item-future  { background: var(--surface); border-left: 4px solid var(--border); opacity: .75; }
.badge-gray { background: #f0f2f7; color: #6b7690; border: 1px solid #d0d4e0; }
.notif-item-top     { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.notif-desc  { font-size: 13px; font-weight: 700; color: var(--text); }
.notif-meta  { font-size: 9px; color: var(--text3); margin-bottom: 10px; }
.notif-amount { font-size: 12px; font-weight: 800; }
.empty-notif { text-align: center; padding: 24px 0; color: var(--text3); font-size: 12px; }

/* ── Reporte ── */
.report-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-total  { border-radius: 16px; padding: 14px; text-align: center; }
.report-inc { background: var(--green-bg); }
.report-exp { background: var(--red-bg); }
.report-total-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.report-inc .report-total-lbl { color: var(--green); }
.report-exp .report-total-lbl { color: var(--red); }
.report-total-val { font-size: 22px; font-weight: 800; }
.report-inc .report-total-val { color: var(--green); }
.report-exp .report-total-val { color: var(--red); }

.budget-item   { margin-bottom: 10px; }
.budget-row    { display: flex; justify-content: space-between; margin-bottom: 4px; }
.budget-label  { font-size: 11px; font-weight: 700; color: var(--text); }
.budget-nums   { font-size: 11px; font-weight: 700; color: var(--text2); }
.budget-track  { background: var(--border); border-radius: 4px; height: 7px; overflow: hidden; }
.budget-fill   { height: 100%; border-radius: 4px; transition: width .4s; }

.budget-input-row   { margin-bottom: 10px; }
.budget-input-label { font-size: 11px; font-weight: 700; color: var(--text2); display: block; margin-bottom: 4px; }

.pay-row    { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 7px 0; font-size: 11px; color: var(--text2); }
.pay-amount { font-weight: 700; color: var(--text); }

.report-tx      { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding: 9px 0; }
.report-tx-desc { font-size: 11px; font-weight: 700; color: var(--text); }
.report-tx-meta { font-size: 9px; color: var(--text3); }

.export-btn { background: var(--green-bg); border: 2px solid #6ee7b7; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.export-btn-text { font-size: 13px; font-weight: 800; color: var(--green); }
.export-btn-sub  { font-size: 10px; color: var(--text3); }

/* ── Tarjetas ── */
.card-list-item { display: flex; justify-content: space-between; align-items: center; background: var(--surface2); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.card-list-name { font-size: 13px; font-weight: 800; color: var(--text); display: block; }
.card-type-chip { display: inline-flex; font-size: 9px; font-weight: 700; margin-top: 3px; padding: 2px 0; }
.chip-debito  { color: var(--teal); }
.chip-credito { color: var(--purple); }
.card-list-actions { display: flex; gap: 10px; }

.card-saldo-lbl { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.card-saldo-val { font-size: 20px; font-weight: 800; color: var(--green); }

/* ── Categorías ── */
.cat-item    { display: flex; justify-content: space-between; align-items: center; background: var(--surface2); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.cat-name    { font-size: 12px; font-weight: 700; color: var(--text); }
.cat-actions { display: flex; gap: 8px; }

/* ── Menú lateral ── */
.menu-header { background: var(--dark); padding: 22px 18px 18px; }
.menu-avatar { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.menu-section-label { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .7px; padding: 8px 2px 4px; }
.menu-item { background: var(--surface); border-radius: 14px; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; cursor: pointer; }
.menu-item:active { background: var(--surface2); }
.menu-item-left { display: flex; align-items: center; gap: 10px; }
.menu-item-ico  { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.menu-item-name { font-size: 12px; font-weight: 700; color: var(--text); }
.menu-item-sub  { font-size: 9px; color: var(--text3); }
.menu-item-arrow { font-size: 16px; color: var(--text3); }
.menu-item-danger .menu-item-name { color: var(--red); }
.menu-zone-box { background: var(--surface); border-radius: 14px; padding: 13px; margin-bottom: 8px; }
.menu-zone-label { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.menu-zone-btns { display: flex; gap: 8px; }
.menu-zone-btn { flex: 1; border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; }
.menu-zone-btn-label { font-size: 11px; font-weight: 700; }
.mzb-green { background: var(--green-bg); }
.mzb-green .menu-zone-btn-label { color: var(--green); }
.mzb-blue  { background: var(--blue-bg); }
.mzb-blue  .menu-zone-btn-label { color: var(--blue); }

/* ── Activar licencia ── */
.activate-crown { width: 54px; height: 54px; border-radius: 18px; background: var(--purple-bg); display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 12px; }
.activate-id-box { background: var(--surface2); border: 1.5px solid #c4b5fd; border-radius: 10px; padding: 10px 14px; text-align: center; }
.activate-id-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.activate-id-val { font-family: monospace; font-size: 14px; font-weight: 700; color: var(--purple); margin-top: 2px; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-card  { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; }
.plan-card-featured { border-color: #fbbf24; background: var(--amber-bg); position: relative; }
.plan-best-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #f59e0b; border-radius: 20px; padding: 2px 10px; font-size: 9px; font-weight: 800; color: #431407; white-space: nowrap; }
.plan-name  { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.plan-price { font-size: 26px; font-weight: 800; color: var(--text); }
.plan-sub   { font-size: 10px; color: var(--text3); }
.bank-box   { background: var(--surface2); border-radius: 12px; padding: 12px 14px; }
.bank-title { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.bank-row   { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 11px; }
.bank-label { color: var(--text3); }
.bank-val   { font-weight: 700; color: var(--text); }
.bank-clabe { font-family: monospace; font-size: 10px; }

/* ── Expirado ── */
.expired-banner { background: var(--dark2); border: 1px solid rgba(229,62,62,.25); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.expired-title  { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.expired-sub    { font-size: 10px; color: #5a6480; margin-bottom: 10px; line-height: 1.5; }
.expired-tabs   { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.expired-tab    { background: var(--dark2); border-radius: 8px; padding: 6px 12px; font-size: 10px; font-weight: 700; color: #5a6480; white-space: nowrap; cursor: pointer; border: none; font-family: inherit; }
.expired-tab-on { background: var(--surface); color: var(--text); }
.locked-block   { background: var(--surface); border: 2px dashed var(--border); border-radius: 14px; padding: 18px; text-align: center; }
.locked-block-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.locked-block-title { font-size: 12px; font-weight: 700; color: var(--text3); }
.locked-block-sub   { font-size: 10px; color: var(--text3); margin-top: 3px; }

/* ── Onboarding ── */
.onboarding-wrap { flex: 1; background: var(--dark); padding: 36px 24px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ob-logo { width: 70px; height: 70px; border-radius: 24px; background: #2dd4bf; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: #0a2421; margin-bottom: 20px; }
.ob-title { font-size: 28px; font-weight: 800; color: #fff; text-align: center; line-height: 1.1; margin-bottom: 10px; }
.ob-sub   { font-size: 13px; color: #5a6480; text-align: center; line-height: 1.65; margin-bottom: 28px; }
.ob-field { width: 100%; margin-bottom: 10px; }
.ob-field-label { font-size: 10px; font-weight: 700; color: #5a6480; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; display: block; }
.ob-input-mock  { background: var(--dark2); border-radius: 12px; padding: 13px 16px; font-size: 13px; color: #5a6480; }
.ob-btn-link    { font-size: 11px; color: #5a6480; text-align: center; margin-top: 10px; }
.ob-btn-link span { color: var(--purple); font-weight: 700; cursor: pointer; }

/* ── Manual ── */
.manual-item { background: var(--surface); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; }
.manual-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 12px; font-weight: 700; color: var(--text);
  cursor: pointer; list-style: none;
}
.manual-summary::-webkit-details-marker { display: none; }
.manual-chevron { color: var(--text3); font-size: 16px; transition: transform .2s; }
details[open] .manual-chevron { transform: rotate(90deg); }
.manual-body { padding: 0 16px 14px; font-size: 11px; color: var(--text2); line-height: 1.65; border-top: 1px solid var(--border); padding-top: 10px; }
.manual-body b { color: var(--text); }
details[open] .manual-body { animation: sweep .25s ease; }
.manual-wa { background: var(--dark); border-radius: 14px; padding: 14px; text-align: center; margin-top: 6px; }
.manual-wa p { font-size: 12px; color: #8892a8; margin-bottom: 10px; }

/* ── Guía pasos ── */
.guide-step { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: var(--radius-md); padding: 13px 14px; margin-bottom: 8px; }
.guide-num  { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; }
.guide-step-title { font-size: 12px; font-weight: 700; color: var(--text); }
.guide-step-body  { font-size: 10px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.guide-step-body b { color: var(--text); }
.guide-tip { background: var(--dark); border-radius: 12px; padding: 12px 14px; font-size: 10px; color: #8892a8; line-height: 1.5; }
.guide-tip b { color: #fff; }

/* ── Type tabs (categorías, tarjetas) ── */
.type-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.type-tab { flex: 1; padding: 9px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 10px; border: none; cursor: pointer; font-family: inherit; transition: all .15s; }
.type-tab-on     { background: var(--dark); color: #fff; }
.type-tab-off    { background: var(--surface2); color: var(--text3); }
.type-tab-purple { background: var(--purple)!important; }
.type-tab-red    { background: var(--red)!important; }

/* ── Empty state ── */
.empty-state { text-align: center; font-size: 12px; color: var(--text3); padding: 16px 0; }

/* ── Cierre de mes ── */
.close-month-info { background: var(--blue-bg); border: 1.5px solid #bfdbfe; border-radius: 12px; padding: 14px; margin-bottom: 14px; font-size: 11px; color: var(--blue); line-height: 1.6; }
.close-month-info li { margin-left: 12px; }

/* ════════════════════════════════
   MANUAL — fix estilos
════════════════════════════════ */
.manual-num { margin-right: 6px; font-size: 15px; }
.manual-item {
  background: #ffffff;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
}
.manual-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1f2e;
  cursor: pointer;
  list-style: none;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
  background: #ffffff;
}
.manual-summary::-webkit-details-marker { display: none; }
.manual-summary > span { flex: 1; line-height: 1.4; color: #1a1f2e; }
.manual-chevron {
  color: #8892a8;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform .25s ease;
  display: inline-block;
}
details[open] > .manual-summary .manual-chevron {
  transform: rotate(180deg);
}
.manual-body {
  padding: 14px 16px 16px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.75;
  border-top: 1.5px solid #e2e8f0;
  background: #f7f8fc;
}
.manual-body b { color: #1a1f2e; font-weight: 700; }
details[open] .manual-body { animation: sweep .2s ease; }
.manual-wa {
  background: #1a1f2e;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 8px;
}
.manual-wa p { font-size: 12px; color: #8892a8; margin-bottom: 12px; }

/* ════════════════════════════════
   LAYOUT BASE
════════════════════════════════ */
.app-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

#appHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: 600px;
}

#bottomNav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  z-index: 20;
}

/* Touch */
button, .menu-item, .bnav-item { min-height: 44px; }
.bnav-item { min-height: 60px; }

/* ════════════════════════════════
   PANTALLAS MEDIANAS (600px+)
════════════════════════════════ */
@media (min-width: 600px) {
  body {
    background: #d8dce8;
    padding-bottom: 80px;
  }

  .modal-sheet {
    max-width: 580px;
    margin: 0 auto;
  }
  .modal-center {
    max-width: 480px;
  }
}

/* ════════════════════════════════
   LAPTOP / DESKTOP (900px+)
════════════════════════════════ */
@media (min-width: 900px) {
  body {
    background: #d0d4de;
    display: flex;
    justify-content: center;
    padding: 32px 24px 80px;
  }

  .app-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(0,0,0,.12);
    min-height: auto;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    position: relative;
  }

  #appHeader {
    position: relative;
    max-width: 100%;
  }

  main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 24px;
  }

  #bottomNav {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    max-width: 100%;
    border-radius: 0 0 24px 24px;
  }

  .modal-overlay {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 20px;
    max-width: 560px;
    align-self: center;
    max-height: 85vh;
  }
}
