/* ═══════════════════════════════════════════════════════
   NEXO BANK — mobile.css
   Optimización completa para móvil y tablet.
   Menú hamburguesa, sidebar overlay, layouts adaptados.
   Breakpoints: 1100px | 860px | 600px | 420px
═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────
   MENÚ HAMBURGUESA (botón flotante en apps)
───────────────────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 400;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-direction: column; gap: 5px;
  padding: 0;
}
.hamburger:hover {
  border-color: var(--k1);
  box-shadow: 0 4px 20px rgba(27,43,75,.18);
}
.ham-line {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
/* Estado abierto del hamburguesa */
.hamburger.open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay oscuro detrás del sidebar */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6,13,38,.55);
  z-index: 350;
  backdrop-filter: blur(2px);
  animation: fadeOverlay .25s ease;
}
.sidebar-overlay.active { display: block; }
@keyframes fadeOverlay { from{opacity:0} to{opacity:1} }

/* ─────────────────────────────────────────────────────
   SIDEBAR MÓVIL — desliza desde la izquierda
───────────────────────────────────────────────────── */
@media (max-width: 860px) {

  /* Sidebar se convierte en drawer */
  .sidebar {
    position: fixed !important;
    left: 0; top: 0; bottom: 0;
    z-index: 360;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 8px 0 40px rgba(6,13,38,.2);
    width: 280px !important;
    height: 100vh;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }

  /* Mostrar hamburguesa */
  .hamburger { display: flex; }

  /* App main ocupa todo el ancho */
  .app-main { max-height: none; width: 100%; }

  /* Padding del app-main deja espacio para hamburguesa */
  .page { padding: 72px 16px 24px; }

  /* Topbar de página */
  .page-top { margin-bottom: 20px; }
  .pg-title  { font-size: 22px; }
}

/* ─────────────────────────────────────────────────────
   LANDING — NAVBAR MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-inner { height: 60px; padding: 0; }
  .nav-cta .btn-nav-ghost { display: none; }
  .nav-cta .btn-nav-grad {
    font-size: 13px; padding: 8px 14px;
  }
}

@media (max-width: 420px) {
  .nav-cta .btn-nav-grad { font-size: 12px; padding: 7px 12px; }
}

/* ─────────────────────────────────────────────────────
   LANDING — HERO MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero {
    padding: 80px 5% 60px;
    min-height: auto;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-title {
    font-size: 38px;
    letter-spacing: -1.5px;
  }
  .hero-sub    { font-size: 15px; max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-btns   { justify-content: center; }
  .hero-trust  { justify-content: center; }
  .hero-visual { display: none; }
  .hero-badge  { display: inline-flex; }
}

@media (max-width: 600px) {
  .hero { padding: 70px 5% 50px; }
  .hero-title { font-size: 30px; letter-spacing: -1px; }
  .hero-btns  { flex-direction: column; align-items: center; }
  .btn-hero   { width: 100%; max-width: 300px; justify-content: center; }
  .hero-trust { flex-direction: column; align-items: center; gap: 10px; }
}

/* ─────────────────────────────────────────────────────
   LANDING — SECCIONES
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .section { padding: 70px 5%; }
  .sec-title { font-size: 32px; letter-spacing: -1px; }
  .sec-desc  { font-size: 15px; margin-bottom: 40px; }

  /* Beneficios: 2 columnas en tablet */
  .benefits-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Nosotros */
  .about-grid  { grid-template-columns: 1fr; gap: 48px; }
  .about-title { font-size: 30px; }
  .about-nums  { grid-template-columns: repeat(3,1fr); }
  .anum-val    { font-size: 28px; }

  /* CTA */
  .cta-title { font-size: 34px; letter-spacing: -1px; }
  .cta-desc  { font-size: 15px; }

  /* Tarjetas showcase */
  .cards-row { gap: 20px; }
  .showcase-card { width: 260px; height: 165px; }
}

@media (max-width: 600px) {
  .section { padding: 56px 5%; }

  /* Beneficios: 1 columna */
  .benefits-grid { grid-template-columns: 1fr; gap: 12px; }
  .ben-card { padding: 22px; }

  /* Tarjetas showcase: apiladas */
  .cards-row { flex-direction: column; align-items: center; gap: 16px; }
  .showcase-card { width: 100%; max-width: 320px; height: 180px; }

  /* Nosotros números: 2 col */
  .about-nums { grid-template-columns: 1fr 1fr; }

  /* CTA */
  .cta-title { font-size: 28px; }
  .btn-big   { width: 100%; justify-content: center; font-size: 15px; padding: 14px 20px; }

  /* Características tarjetas */
  .cards-features { gap: 10px; }
  .cf-item        { font-size: 12px; padding: 6px 12px; }
}

@media (max-width: 420px) {
  .sec-title  { font-size: 26px; }
  .about-nums { grid-template-columns: 1fr; }
  .anum-val   { font-size: 32px; }
}

/* ─────────────────────────────────────────────────────
   LOGIN — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  #screen-login.active {
    grid-template-columns: 1fr;
  }
  .login-left  { display: none; }
  .login-right {
    padding: 40px 24px;
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 60px;
  }
  .login-box { max-width: 100%; }
}

@media (max-width: 420px) {
  .login-right { padding: 48px 20px 32px; }
  .login-head h2 { font-size: 24px; }
}

/* ─────────────────────────────────────────────────────
   PANEL CLIENTE — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 860px) {

  /* Balance card */
  .bal-card   { padding: 22px 20px; margin-bottom: 18px; }
  .bal-amount { font-size: 36px; letter-spacing: -1.5px; }
  .bal-top    { margin-bottom: 18px; }
  .bal-card-mini { width: 72px; height: 46px; }
  .mini-brand    { font-size: 12px; }

  /* Stats del balance: scroll horizontal en móvil muy pequeño */
  .bal-stats { gap: 0; overflow-x: auto; padding-bottom: 4px; }
  .bal-stat  { min-width: 90px; }
  .bal-stat + .bal-stat { padding-left: 16px; margin-left: 16px; }
  .bsv { font-size: 15px; }

  /* Tarjeta digital */
  .digi-card  { padding: 20px; }
  .card-num   { font-size: 15px; }
  .card-brand { font-size: 18px; }

  /* CLABE card */
  .clabe-num  { font-size: 16px; letter-spacing: 1px; }

  /* Cuenta page */
  .acc-grid         { grid-template-columns: 1fr; }
  .acc-card-prof    { padding: 24px 16px; }
  .acc-av-big       { width: 64px; height: 64px; font-size: 22px; }
  .acc-bal-val      { font-size: 22px; }
}

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

  /* Movimientos */
  .mov-row  { padding: 12px 14px; }
  .mov-row-rich {
    align-items:stretch;
    flex-direction:column;
    gap:12px;
  }
  .mov-row-rich .mov-left {
    width:100%;
  }
  .mov-ico  { width: 34px; height: 34px; }
  .mov-desc { font-size: 13px; }
  .mov-detail-grid {
    grid-template-columns:1fr;
    gap:7px;
  }
  .mov-route-arrow {
    min-height:12px;
    transform:rotate(90deg);
  }
  .mov-party {
    padding:9px 10px;
  }
  .mov-party strong {
    white-space:normal;
  }
  .mov-meta {
    gap:6px;
  }
  .mov-chip {
    font-size:10.5px;
  }
  .mov-right {
    min-width:0;
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    border-top:1px solid rgba(124,58,237,.08);
    padding-top:10px;
  }
  .mov-amt  { font-size: 14px; }
  .mov-bal  { font-size: 11px; }

  /* Filter tabs: compactos */
  .ftabs { gap: 4px; }
  .ftab  { padding: 5px 10px; font-size: 12px; }

  /* Card head: apilar si necesario */
  .card-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-head .ftabs,
  .card-head .search-box { width: 100%; }
  .card-head .search-box input { width: 100%; }
}

/* ─────────────────────────────────────────────────────
   PANEL ADMIN — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-row       { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .dash-two-col  { grid-template-columns: 1fr; }
  .dep-layout    { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .kpi-row { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .kpi     { padding: 16px; }
  .kpi-ico { width: 36px; height: 36px; border-radius: 10px; }
  .kpi-val { font-size: 18px; }

  /* Tabla de clientes: scroll horizontal */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 640px; }
  .tbl thead th,
  .tbl td { padding: 10px 14px; font-size: 13px; }

  /* Acciones en tabla: solo iconos */
  .tbl .btn-xs { padding: 5px 8px; }

  /* Admin badge */
  .admin-badge-top { font-size: 11px; padding: 3px 10px; }
  .pg-title { font-size: 22px; }
}

@media (max-width: 600px) {
  .kpi-row { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .kpi     { flex-direction: column; gap: 8px; padding: 14px; }
  .kpi-ico { width: 32px; height: 32px; }
  .kpi-val { font-size: 20px; }
  .kpi-lbl { font-size: 11px; }

  /* Formularios */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .card-body-pad { padding: 16px; }

  /* Botón full-width en mobile */
  .page-top .btn { width: 100%; justify-content: center; }
  .page-top { flex-direction: column; align-items: flex-start; }
}

/* ─────────────────────────────────────────────────────
   MODALES — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .modal-ov { align-items: flex-end; padding: 0; }

  /* Modal como bottom sheet */
  .modal {
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
    width: 100%;
    animation: slideUp .3s cubic-bezier(.4,0,.2,1);
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .modal-sm,
  .modal-md,
  .modal-lg { max-width: 100%; }

  .modal-body { padding: 16px 20px; }
  .modal-head { padding: 20px 20px 0; }
  .modal-foot { padding: 14px 20px 20px; gap: 8px; }
  .modal-foot .btn { flex: 1; justify-content: center; }

  /* Ver cliente stats: 2x2 */
  .vc-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .vc-stat:nth-child(2) { border-right: none; }
  .vc-stat:nth-child(3) { border-top: 1px solid var(--border); }
  .vc-stat:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }

  /* Editar cliente: 1 col en modal */
  .modal-body .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ─────────────────────────────────────────────────────
   COMPONENTES GENERALES — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* Search box full width */
  .search-box { width: 100%; }
  .search-box input { width: 100% !important; }

  /* Toast en bottom center */
  .toast {
    bottom: 16px; left: 16px; right: 16px;
    max-width: none; width: calc(100% - 32px);
    font-size: 13px;
  }

  /* Pills más compactas */
  .pill { font-size: 11px; padding: 2px 8px; }

  /* Info rows más compactas */
  .info-list .ir { padding: 11px 16px; font-size: 13px; }
  .ir-v { font-size: 13px; text-align: right; max-width: 60%; word-break: break-all; }

  /* Clabe en cuenta */
  .clabe-small { font-size: 11px; }
}

@media (max-width: 420px) {
  /* Reducir padding general en pantallas muy pequeñas */
  .page { padding: 68px 12px 20px; }

  /* Balance card ultra compacto */
  .bal-card   { padding: 18px 14px; }
  .bal-amount { font-size: 30px; }
  .bal-stats  { gap: 0; }
  .bsv        { font-size: 14px; }
  .bsl        { font-size: 10px; }

  /* Sección bar */
  .section-bar { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Tarjeta digital mini */
  .digi-card { padding: 16px; }
  .card-num  { font-size: 13px; letter-spacing: 1px; }

  /* Modales fondo completo */
  .modal { border-radius: 20px 20px 0 0; }
}

/* ─────────────────────────────────────────────────────
   FOOTER — MÓVIL
───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start; gap: 12px;
  }
  .footer-text { font-size: 12px; }
}

/* ─────────────────────────────────────────────────────
   UTILIDADES TOUCH
───────────────────────────────────────────────────── */
/* Área mínima de toque 44×44px para botones pequeños */
@media (max-width: 860px) {
  .btn-xs { min-height: 34px; min-width: 34px; }
  .btn-sm { min-height: 38px; }
  .nav-item { min-height: 44px; }
  .sb-logout { min-height: 40px; }

  /* Eliminar hover en touch (evita estados pegados) */
  .ben-card:hover,
  .kpi:hover,
  .ac:hover { transform: none; box-shadow: none; }
}

/* ─────────────────────────────────────────────────────
   SCROLL SUAVE EN IOS
───────────────────────────────────────────────────── */
.app-main,
.sidebar,
.modal {
  -webkit-overflow-scrolling: touch;
}

/* ─────────────────────────────────────────────────────
   TABLA CON SCROLL HORIZONTAL (wrapper)
───────────────────────────────────────────────────── */
.tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* Sombra indicadora de scroll */
.tbl-scroll::after {
  content: '';
  position: sticky;
  right: 0; top: 0; bottom: 0;
  width: 24px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.9));
  pointer-events: none;
  display: block;
}

/* Stats strips compactos para movil */
@media (max-width: 600px) {
  .bal-card {
    padding: 18px 16px;
    border-radius: 20px;
    margin-bottom: 14px;
    box-shadow:
      0 18px 34px rgba(44,18,94,.22),
      0 8px 16px rgba(42,13,84,.16),
      inset 0 1px 0 rgba(255,255,255,.3),
      inset 0 -18px 34px rgba(20,8,44,.16);
  }

  .bal-top {
    margin-bottom: 14px;
  }

  .bal-amount {
    font-size: 29px;
    line-height: 1;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .bal-card-mini {
    width: 76px;
    height: 48px;
    border-radius: 9px;
  }

  .bal-sub {
    font-size: 11px;
  }

  .bal-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .bal-stat {
    min-width: 0;
    padding: 0;
  }

  .bal-stat + .bal-stat {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,.16);
  }

  .bsl {
    font-size: 9px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .bsv {
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .kpi {
    min-height: 74px;
    padding: 10px 11px;
    gap: 8px;
    border-radius: 10px;
  }

  .kpi::before {
    height: 3px;
  }

  .kpi-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .kpi-ico svg {
    width: 16px;
    height: 16px;
  }

  .kpi-lbl {
    font-size: 9.5px;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .kpi-val {
    font-size: 16px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .report-kpi {
    min-height: 72px;
    padding: 10px 11px;
    border-radius: 10px;
  }

  .report-kpi-lbl {
    font-size: 9.5px;
    line-height: 1.2;
    margin-bottom: 3px;
  }

  .report-kpi-val {
    font-size: 17px;
    line-height: 1.15;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
  }

  .report-kpi-sub {
    font-size: 10px;
    line-height: 1.2;
  }

  .vc-stats-bar {
    gap: 0;
    margin-bottom: 12px;
  }

  .vc-stat {
    min-height: 58px;
    padding: 10px 8px;
  }

  .vc-stat-lbl {
    font-size: 9px;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .vc-stat-val {
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .bal-amount {
    font-size: 26px;
  }

  .bsv {
    font-size: 12px;
  }

  .kpi {
    min-height: 68px;
    padding: 9px 10px;
  }

  .kpi-val {
    font-size: 15px;
  }
}

/* Landing estable en navegadores y pantallas estrechas */
@media (max-width: 600px) {
  .nav {
    padding: 0 14px;
  }

  .nav-inner {
    height: 56px;
    width: 100%;
    min-width: 0;
  }

  .nav-logo {
    width: auto;
    max-width: 74px;
    height: 28px;
    object-fit: contain;
  }

  .nav-cta {
    flex-shrink: 0;
  }

  .nav-cta .btn-nav-grad {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    padding: 68px 14px 42px;
    align-items: center;
  }

  .hero-inner {
    width: 100%;
    min-width: 0;
    gap: 0;
  }

  .hero-badge {
    max-width: 100%;
    padding: 7px 13px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .08em;
    white-space: nowrap;
  }

  .hero-title {
    max-width: 11ch;
    margin: 18px auto 16px;
    font-size: clamp(25px, 8.8vw, 32px);
    line-height: 1.12;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .hero-sub {
    max-width: 32ch;
    margin: 0 auto 24px;
    font-size: clamp(13px, 4vw, 15px);
    line-height: 1.65;
    text-wrap: pretty;
  }

  .hero-btns {
    width: 100%;
    max-width: 300px;
    gap: 10px;
    margin: 0 auto 24px;
  }

  .btn-hero {
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.1;
  }

  .hero-trust {
    width: fit-content;
    max-width: 250px;
    margin: 0 auto;
    gap: 8px;
    align-items: flex-start;
  }

  .trust-chip {
    font-size: 12px;
    line-height: 1.25;
  }

  .stats-strip {
    padding: 16px 12px;
  }

  .stats-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 300px;
    gap: 12px 6px;
  }

  .stat-item {
    min-width: 0;
    min-height: 42px;
  }

  .stat-val {
    font-size: clamp(18px, 7vw, 21px);
    line-height: 1;
    margin-bottom: 4px;
    white-space: nowrap;
  }

  .stat-lbl {
    font-size: 10px;
    line-height: 1.15;
    max-width: 82px;
  }
}

@media (max-width: 340px) {
  .nav {
    padding: 0 10px;
  }

  .nav-logo {
    max-width: 62px;
    height: 24px;
  }

  .nav-cta .btn-nav-grad {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11px;
  }

  .hero {
    padding: 62px 8px 34px;
  }

  .hero-badge {
    padding: 6px 10px;
    font-size: 9px;
  }

  .hero-title {
    max-width: 10.5ch;
    margin-top: 16px;
    margin-bottom: 14px;
    font-size: clamp(24px, 8.6vw, 28px);
  }

  .hero-sub {
    max-width: 30ch;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.55;
  }

  .hero-btns {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .btn-hero {
    min-height: 44px;
    padding: 11px 14px;
    font-size: 13px;
  }

  .hero-trust {
    max-width: 218px;
    gap: 7px;
  }

  .trust-chip {
    font-size: 11px;
  }

  .stats-strip {
    padding: 14px 8px;
  }

  .stats-inner {
    max-width: 260px;
    gap: 10px 4px;
  }

  .stat-item {
    min-height: 40px;
  }

  .stat-val {
    font-size: 18px;
  }

  .stat-lbl {
    font-size: 9px;
    max-width: 74px;
  }
}

/* Blindaje responsive para anchos tipo Fold y navegadores moviles */
@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .screen,
  .screen.active,
  #screen-landing {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .section,
  .section-cta,
  .stats-strip,
  .footer,
  .nav,
  .hero {
    width: 100%;
    max-width: 100%;
  }

  .section,
  .section-cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cta-title {
    max-width: 12ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(27px, 8vw, 32px);
    line-height: 1.12;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .cta-desc {
    max-width: 31ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(13px, 4vw, 15px);
    line-height: 1.65;
  }

  .btn-big {
    width: 100%;
    max-width: 300px;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.1;
    justify-content: center;
  }

  .footer {
    padding: 26px 16px max(32px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 14px;
    width: min(100%, 320px);
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .footer .nav-brand {
    width: auto;
    max-width: 100%;
    justify-content: center;
  }

  .footer .nav-logo {
    width: auto;
    max-width: 70px;
    height: 28px;
    object-fit: contain;
  }

  .footer-text {
    max-width: 28ch;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .footer-links a {
    min-width: 0;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
}

@supports (overflow: clip) {
  @media (max-width: 600px) {
    body,
    .screen,
    .screen.active,
    #screen-landing {
      overflow-x: clip;
    }
  }
}

@media (max-width: 360px) {
  .section,
  .section-cta {
    padding-left: 12px;
    padding-right: 12px;
  }

  .footer {
    padding-left: 10px;
    padding-right: 10px;
  }

  .footer-inner {
    width: min(100%, 300px);
    gap: 12px;
  }

  .footer-links {
    gap: 11px;
  }

  .footer-links a {
    font-size: 11.5px;
  }
}

.cuentas-mobile-list {
  display: none;
}

@media (max-width: 700px) {
  .cuentas-desktop-table {
    display: none;
  }

  .cuentas-mobile-list {
    display: grid;
    gap: 12px;
  }

  .cuenta-mobile-card {
    width: 100%;
    border: 1px solid rgba(124,58,237,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 12px 34px rgba(26,5,51,.08);
    padding: 14px;
  }

  .cuenta-mobile-head,
  .cuenta-mobile-row,
  .cuenta-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .cuenta-mobile-head {
    margin-bottom: 12px;
  }

  .cuenta-mobile-head .font-mono {
    font-size: 13px;
    color: var(--text2);
  }

  .cuenta-mobile-row {
    padding: 8px 0;
    border-top: 1px solid rgba(124,58,237,.08);
    font-size: 13px;
  }

  .cuenta-mobile-row span {
    color: var(--text3);
  }

  .cuenta-mobile-row strong {
    color: var(--k1);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .cuenta-mobile-actions {
    margin-top: 14px;
  }

  .cuenta-mobile-actions .btn {
    flex: 1;
    min-height: 42px;
    justify-content: center;
  }
}

/* Mobile fintech card refinements */
@media (max-width: 760px) {
  .fintech-tabs {
    gap:8px;
    margin-bottom:18px;
    padding-bottom:12px;
  }
  .subtab-btn {
    min-height:38px;
    padding:9px 12px;
    border-radius:14px;
    font-size:12px;
  }
  .subtab-btn svg { width:16px; height:16px; }
  .fintech-card-3d {
    min-height:205px;
    padding:22px;
    transform:none;
  }
  .fintech-card-3d:hover { transform:translateY(-2px); }
  .digi-card-top { margin-bottom:34px; }
  .card-chip-el { width:48px; height:36px; border-radius:10px; }
  .digi-network { padding:8px 11px; font-size:12px; }
  .digi-number { font-size:17px; letter-spacing:.08em; }
  .digi-meta { margin-top:22px; gap:12px; }
  .digi-value { font-size:12px; max-width:145px; }
  .card-3d-detail .info-list .ir { align-items:flex-start; gap:12px; }
}
@media (max-width: 380px) {
  .digi-number { font-size:15px; letter-spacing:.06em; }
  .digi-meta { flex-direction:column; }
  .fintech-tabs { gap:6px; }
  .subtab-btn { padding:9px 10px; }
}

/* Mobile dark theme contrast fixes */
@media (max-width: 700px) {
  :root[data-theme="dark"] .cuenta-mobile-card {
    background:rgba(24,15,43,.88);
    border-color:rgba(216,206,255,.14);
    box-shadow:0 16px 38px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05);
  }
  :root[data-theme="dark"] .cuenta-mobile-head .font-mono,
  :root[data-theme="dark"] .cuenta-mobile-row strong {
    color:var(--text);
  }
  :root[data-theme="dark"] .cuenta-mobile-row {
    border-color:rgba(216,206,255,.1);
  }
  :root[data-theme="dark"] .cuenta-mobile-row span {
    color:var(--text2);
  }
}

/* CEO mobile cards for dense executive tables */
@media (max-width: 760px) {
  #screen-ceo.app-screen.active {
    min-width: 0;
    overflow-x: hidden;
  }

  #screen-ceo .app-main {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }

  #screen-ceo .page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  #screen-ceo .page-top {
    align-items: stretch;
    gap: 14px;
  }

  #screen-ceo .page-top > div:last-child,
  #screen-ceo .card-head,
  #screen-ceo .filter-bar {
    width: 100%;
  }

  #screen-ceo .kpi-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #screen-ceo .dash-two-col,
  #screen-ceo .report-grid {
    grid-template-columns: 1fr !important;
  }

  #screen-ceo .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    border-radius: 18px;
  }

  #screen-ceo .tbl-scroll {
    overflow: visible;
    border-radius: 0 0 18px 18px;
  }

  #screen-ceo .tbl-scroll::after {
    display: none;
  }

  #screen-ceo table.tbl-mobile-card,
  #screen-ceo table.tbl-mobile-card thead,
  #screen-ceo table.tbl-mobile-card tbody,
  #screen-ceo table.tbl-mobile-card tr,
  #screen-ceo table.tbl-mobile-card td {
    display: block;
    width: 100%;
  }

  #screen-ceo table.tbl-mobile-card {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  #screen-ceo table.tbl-mobile-card thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #screen-ceo table.tbl-mobile-card tbody {
    padding: 10px;
  }

  #screen-ceo table.tbl-mobile-card tbody tr {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(124,58,237,.13);
    border-radius: 16px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 12px 30px rgba(26,5,51,.08);
    cursor: default;
  }

  #screen-ceo table.tbl-mobile-card tbody tr:last-child {
    margin-bottom: 0;
  }

  #screen-ceo table.tbl-mobile-card td {
    position: relative;
    min-height: 34px;
    padding: 8px 0 8px 108px !important;
    border: 0 !important;
    font-size: 13px;
    line-height: 1.35;
    text-align: left !important;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #screen-ceo table.tbl-mobile-card td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 9px;
    width: 96px;
    color: var(--text3);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  #screen-ceo table.tbl-mobile-card td[data-label="Acciones"] {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 0 !important;
    padding-top: 12px !important;
    margin-top: 6px;
    border-top: 1px solid rgba(124,58,237,.1) !important;
  }

  #screen-ceo table.tbl-mobile-card td[data-label="Acciones"]::before {
    position: static;
    width: 100%;
    margin-bottom: 2px;
  }

  #screen-ceo table.tbl-mobile-card .cc {
    min-width: 0;
  }

  #screen-ceo table.tbl-mobile-card .pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.15;
  }

  #screen-ceo .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #screen-ceo .filter-sep {
    display: none;
  }

  #screen-ceo .filter-select,
  #screen-ceo .filter-input-sm,
  #screen-ceo .search-box,
  #screen-ceo .search-box input {
    width: 100% !important;
  }

  #screen-ceo .ftabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  #screen-ceo .ftab {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .card-3d-detail .info-list .ir {
    display: grid;
    grid-template-columns: minmax(78px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .card-3d-detail .ir-l {
    min-width: 0;
  }

  .card-3d-detail .ir-v,
  #cd-num,
  #cd-exp {
    max-width: 100%;
    justify-self: end;
    text-align: right;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }

  :root[data-theme="dark"] #screen-ceo table.tbl-mobile-card tbody tr {
    background: rgba(24,15,43,.88);
    border-color: rgba(216,206,255,.14);
    box-shadow: 0 16px 38px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05);
  }
}
