/* ═══════════════════════════════════════════════════════════════════
   FacturaWeb — hoja de estilos
   Estética: "tinta y papel moderno" — índigo profundo sobre papel
   cálido, acentos esmeralda, tipografía display con carácter.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --indigo: #4338CA;
  --indigo-dark: #312E81;
  --indigo-ink: #1E1B4B;
  --indigo-light: #6366F1;
  --emerald: #10B981;
  --emerald-dark: #047857;
  --amber: #B45309;
  --bg: #FAF9F7;
  --card: #FFFFFF;
  --border: #E7E5E0;
  --text: #1C1917;
  --text-muted: #6B7280;
  --danger: #DC2626;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .06), 0 2px 8px rgba(30, 27, 75, .05);
  --shadow: 0 1px 3px rgba(30, 27, 75, .07), 0 10px 32px rgba(30, 27, 75, .09);
  --shadow-lg: 0 4px 12px rgba(30, 27, 75, .10), 0 24px 56px rgba(30, 27, 75, .16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
h1, h2, h3, .lp-logo, .brand-name, .sidebar-logo, .login-title, .lp-plan-price, .pos-total {
  font-family: var(--font-display);
}

/* ── Botones ─────────────────────────────────────────────────────── */
.btn, .lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 10px 18px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
}
.btn:active, .lp-btn:active { transform: translateY(1px) scale(.99); }
.btn-primary, .lp-btn-primary {
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo) 55%, var(--indigo-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(67, 56, 202, .35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover, .lp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(67, 56, 202, .42), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-ghost, .lp-btn-ghost { background: transparent; color: var(--indigo); border: 1.5px solid var(--border); }
.btn-ghost:hover, .lp-btn-ghost:hover { background: #EEF2FF; border-color: #C7D2FE; }
.btn-xl, .lp-btn-lg { padding: 14px 24px; font-size: 16px; width: 100%; }
.lp-btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:focus-visible, .lp-btn:focus-visible, .form-input:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .4); outline-offset: 1px;
}

/* ── Formularios ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus { outline: none; border-color: var(--indigo-light); box-shadow: 0 0 0 4px rgba(99,102,241,.14); }

/* ════════════════════════════ LANDING ════════════════════════════ */
.landing { background: var(--bg); }
.lp-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.lp-header { position: sticky; top: 0; background: rgba(250,249,247,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); z-index: 10; }
.lp-header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.lp-logo, .brand-name, .sidebar-logo { font-weight: 800; font-size: 23px; color: var(--indigo-ink); letter-spacing: -.02em; }
.lp-logo span, .brand-name span, .sidebar-logo span { color: var(--emerald); }
.lp-nav { display: flex; align-items: center; gap: 20px; font-weight: 600; }
.lp-nav a:not(.lp-btn) { color: var(--text-muted); transition: color .15s; }
.lp-nav a:not(.lp-btn):hover { color: var(--indigo); }

/* Hero con malla de gradiente + patrón de puntos */
.lp-hero { position: relative; padding: 88px 0 96px; overflow: hidden; }
.lp-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 380px at 12% 0%, rgba(99, 102, 241, .13), transparent 65%),
    radial-gradient(640px 420px at 95% 18%, rgba(16, 185, 129, .12), transparent 60%),
    radial-gradient(circle, rgba(30, 27, 75, .10) 1px, transparent 1.5px);
  background-size: auto, auto, 26px 26px;
}
.lp-hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.lp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ECFDF5; color: var(--emerald-dark); font-size: 13px; font-weight: 700;
  padding: 7px 16px; border-radius: 100px; margin-bottom: 20px; border: 1px solid #A7F3D0;
}
.lp-badge::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  animation: pulso 2s ease-in-out infinite;
}
@keyframes pulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.45); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.lp-hero-text h1 {
  font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.03em;
  margin: 0 0 18px; color: var(--indigo-ink); font-weight: 800;
}
.lp-hero-text h1 em {
  font-style: normal; color: var(--emerald-dark);
  background: linear-gradient(0deg, rgba(16,185,129,.18) 0 32%, transparent 32%);
  border-radius: 4px; padding: 0 2px;
}
.lp-hero-text p { font-size: 17px; color: var(--text-muted); line-height: 1.65; margin-bottom: 30px; max-width: 46ch; }
.lp-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.lp-hero-cta .lp-btn { width: auto; padding: 14px 26px; }

/* Entrada escalonada del hero */
.lp-hero-text > * , .lp-hero-card { opacity: 0; transform: translateY(18px); animation: aparecer .7s cubic-bezier(.2,.7,.3,1) forwards; }
.lp-hero-text > *:nth-child(1) { animation-delay: .05s; }
.lp-hero-text > *:nth-child(2) { animation-delay: .15s; }
.lp-hero-text > *:nth-child(3) { animation-delay: .25s; }
.lp-hero-text > *:nth-child(4) { animation-delay: .35s; }
.lp-hero-card { animation-delay: .3s; }
@keyframes aparecer { to { opacity: 1; transform: translateY(0); } }

.lp-hero-card { display: flex; justify-content: center; }
.lp-mock-invoice {
  position: relative;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px; width: 100%; max-width: 370px; border: 1px solid var(--border);
  transform: rotate(1.5deg);
  animation: flotar 6s ease-in-out infinite, aparecer .7s cubic-bezier(.2,.7,.3,1) .3s forwards;
}
@keyframes flotar {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
.lp-mock-stamp {
  position: absolute; top: 14px; right: -14px; transform: rotate(9deg);
  background: #ECFDF5; color: var(--emerald-dark); border: 2px solid var(--emerald);
  font-weight: 800; font-size: 12px; letter-spacing: .1em; padding: 5px 12px; border-radius: 8px;
}
.lp-mock-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.lp-mock-head { font-weight: 700; color: var(--indigo); border-bottom-style: solid; }
.lp-mock-total { font-weight: 800; font-size: 17px; border-bottom: none; color: var(--emerald-dark); }

.lp-section { padding: 76px 0; }
.lp-section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-section-title { text-align: center; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.02em; color: var(--indigo-ink); margin: 0 0 10px; }
.lp-section-sub { text-align: center; color: var(--text-muted); margin-bottom: 44px; }

.lp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-feature-card {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.lp-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #C7D2FE; }
.lp-feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; font-size: 24px; border-radius: 12px;
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF); margin-bottom: 14px;
}
.lp-feature-card h3 { margin: 0 0 8px; font-size: 16px; }
.lp-feature-card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

.lp-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.lp-plan-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; position: relative; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lp-plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lp-plan-featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, var(--indigo-light), var(--emerald)) border-box;
  box-shadow: var(--shadow-lg);
}
.lp-plan-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 100px;
  box-shadow: 0 4px 12px rgba(67,56,202,.35); white-space: nowrap;
}
.lp-plan-card h3 { margin: 6px 0; color: var(--indigo-ink); font-size: 20px; }
.lp-plan-price { font-size: 36px; font-weight: 800; margin: 10px 0; letter-spacing: -.02em; color: var(--indigo-ink); }
.lp-plan-price span { font-size: 14px; font-weight: 500; color: var(--text-muted); font-family: var(--font-body); }
.lp-plan-desc { color: var(--text-muted); font-size: 13px; min-height: 40px; line-height: 1.5; }
.lp-plan-list { list-style: none; padding: 0; margin: 18px 0 24px; font-size: 14px; text-align: left; }
.lp-plan-list li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed var(--border); }
.lp-plan-list li:last-child { border-bottom: none; }
.lp-plan-list li::before {
  content: '✓'; position: absolute; left: 2px; color: var(--emerald);
  font-weight: 800;
}

.lp-register { display: flex; justify-content: center; }
.lp-register-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 38px; width: 100%; max-width: 460px;
}
.lp-register-card h2 { margin-top: 0; color: var(--indigo-ink); }
.lp-form-error, .modal-error, .login-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

.lp-footer { padding: 34px 0; text-align: center; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }

/* ════════════════════════════ LOGIN ════════════════════════════ */
#screen-login { display: flex; min-height: 100vh; min-height: 100dvh; }
.login-brand {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--indigo-ink), var(--indigo-dark) 55%, var(--indigo));
  display: flex; align-items: center; justify-content: center;
}
.login-brand::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(420px 320px at 85% 10%, rgba(16,185,129,.22), transparent 60%),
    radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1.6px);
  background-size: auto, 24px 24px;
}
.brand-content { position: relative; text-align: center; color: #fff; padding: 40px 24px; }
.login-brand .brand-name { color: #fff; font-size: 42px; }
.login-brand .brand-name span { color: #A7F3D0; }
.brand-tagline { opacity: .85; margin-top: 10px; font-size: 15px; }
.login-form-area { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 32px 20px; }
.login-form-box { width: 100%; max-width: 360px; }
.login-title { font-size: 28px; font-weight: 800; color: var(--indigo-ink); letter-spacing: -.02em; }
.login-subtitle { color: var(--text-muted); margin-bottom: 24px; }
.login-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.login-footer a { color: var(--indigo); font-weight: 600; }
.login-demo { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.login-demo code { background: #EEF2FF; padding: 2px 6px; border-radius: 6px; }

/* ════════════════════════════ APP ════════════════════════════ */
#screen-app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }
#sidebar {
  background: linear-gradient(180deg, var(--indigo-ink), var(--indigo-dark) 130%);
  color: #fff; display: flex; flex-direction: column; padding: 20px 0;
}
.sidebar-header { padding: 0 20px 16px; }
#sidebar .sidebar-logo { color: #fff; }
#sidebar .sidebar-logo span { color: #A7F3D0; }
.sidebar-user { padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-user-name { font-weight: 700; }
.sidebar-user-role { font-size: 12px; opacity: .7; text-transform: capitalize; }
.membresia-banner { margin: 14px 20px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12px; background: var(--amber); }
.membresia-banner.vencida { background: var(--danger); }
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center;
  padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 600; font-size: 14px; opacity: .82; margin-bottom: 2px;
  border-left: 3px solid transparent;
  transition: background .15s, opacity .15s, border-color .15s, transform .12s;
}
.nav-item:hover { background: rgba(255,255,255,.08); opacity: 1; transform: translateX(2px); }
.nav-item.active { background: rgba(255,255,255,.14); opacity: 1; border-left-color: var(--emerald); }
.nav-icon { margin-right: 9px; }
#sidebar .btn-ghost { margin: 10px 20px 0; color: #fff; border-color: rgba(255,255,255,.22); }
#sidebar .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Barra superior móvil (oculta en escritorio) */
#topbar-movil {
  display: none; position: sticky; top: 0; z-index: 60;
  background: var(--indigo-ink); color: #fff;
  align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
#topbar-movil .sidebar-logo { font-size: 20px; color: #fff; }
#btn-menu {
  background: rgba(255,255,255,.1); color: #fff; border: none; border-radius: 8px;
  font-size: 20px; line-height: 1; padding: 8px 12px; cursor: pointer;
}
#sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(17,24,39,.55); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.menu-abierto #sidebar-backdrop { opacity: 1; pointer-events: auto; }

#frame-center { padding: 32px 40px; overflow-y: auto; min-width: 0; }
.view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.view-header h1 { font-size: 25px; color: var(--indigo-ink); margin: 0; letter-spacing: -.02em; }
.subtitle { font-size: 16px; color: var(--indigo-ink); margin: 28px 0 12px; }
.view { animation: vistaEntra .25s ease; }
@keyframes vistaEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Tablas: en pantallas angostas se deslizan horizontalmente */
.tabla-scroll, .data-table { max-width: 100%; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.data-table th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); padding: 12px 16px; background: #F5F4F1; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--indigo); }
.data-table th.sortable.sort-asc::after { content: ' ▲'; }
.data-table th.sortable.sort-desc::after { content: ' ▼'; }
.data-table td { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #FAFAF8; }
.badge { padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-success { background: #ECFDF5; color: var(--emerald-dark); }
.badge-danger { background: #FEF2F2; color: var(--danger); }
.badge-warn { background: #FFFBEB; color: var(--amber); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 24px; margin-bottom: 16px; }

/* ── Modales ─────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal {
  background: #fff; border-radius: var(--radius); padding: 28px; width: 100%;
  max-width: 460px; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: modalEntra .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes modalEntra { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h2 { margin-top: 0; color: var(--indigo-ink); letter-spacing: -.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.fact-item-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.fact-item-row select { flex: 2; } .fact-item-row input { flex: 1; }
.fact-item-row button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 16px; }

/* ── Facturación rápida (POS) ───────────────────────────────────────── */
.modal-pos { max-width: 720px; }
.pos-row { display: flex; gap: 14px; }
.pos-row .form-group { flex: 1; }
.pos-lookup { font-size: 12px; margin-top: 4px; color: var(--text-muted); min-height: 16px; }
.pos-lookup.ok { color: var(--emerald-dark); font-weight: 600; }
.pos-lookup.error { color: var(--danger); font-weight: 600; }
.pos-items-table { margin-bottom: 4px; box-shadow: none; border: 1px solid var(--border); }
.pos-items-table th, .pos-items-table td { padding: 8px 10px; font-size: 13px; }
.pos-items-table input.pos-cant-input { width: 60px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.pos-items-table button.pos-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 15px; }
.pos-total { font-size: 26px; font-weight: 800; color: var(--indigo-ink); padding-top: 8px; }
.pos-pago-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.pos-pago-row select { flex: 1; } .pos-pago-row input { flex: 1; }
.pos-pago-row button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 16px; }
.pago-dias-row { margin-top: -4px; margin-bottom: 12px; padding-left: 4px; }
.pago-efectivo-row { margin-top: -4px; margin-bottom: 12px; padding-left: 4px; }
.pago-cambio-info { font-weight: 700; color: var(--emerald-dark); }
.pos-balance { font-weight: 700; padding: 10px 0; }
.pos-balance.ok { color: var(--emerald-dark); }
.pos-balance.pending { color: var(--amber); }
.margen-pos { color: var(--emerald-dark); font-weight: 700; }
.margen-neg { color: var(--danger); font-weight: 700; }
.precio-extra-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.precio-extra-row button { background: none; border: none; color: var(--danger); cursor: pointer; }

/* ── Módulos bloqueados por plan ── */
.nav-item.bloqueado { opacity: .5; }
.nav-item.bloqueado:hover { opacity: .75; }
.nav-item .candado { font-size: .75em; margin-left: auto; }

/* ═══════════════════════ RESPONSIVE MÓVIL ═══════════════════════ */
@media (max-width: 960px) {
  /* Landing */
  .lp-hero { padding: 48px 0 64px; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lp-hero-text p { max-width: none; }
  .lp-mock-invoice { transform: rotate(0); max-width: 420px; }
  .lp-features { grid-template-columns: repeat(2, 1fr); }
  .lp-plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .lp-plan-featured { transform: none; }
  .lp-nav a:not(.lp-btn) { display: none; }
  .lp-nav .lp-btn-ghost { display: none; }
  .lp-section { padding: 56px 0; }

  /* Login: la marca pasa a ser un encabezado compacto */
  #screen-login { flex-direction: column; }
  .login-brand { flex: 0 0 auto; min-height: 148px; }
  .login-brand .brand-name { font-size: 30px; }
  .login-form-area { align-items: flex-start; padding-top: 36px; }

  /* App: menú lateral tipo cajón + barra superior */
  #screen-app { display: block; }
  #topbar-movil { display: flex; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 272px; max-width: 84vw;
    z-index: 80; transform: translateX(-104%); transition: transform .25s cubic-bezier(.2,.7,.3,1);
    box-shadow: var(--shadow-lg); overflow-y: auto;
  }
  body.menu-abierto #sidebar { transform: translateX(0); }
  #frame-center { padding: 18px 14px 40px; }
  .view-header h1 { font-size: 21px; }

  /* Tablas deslizables sin romper el layout */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .data-table th, .data-table td { white-space: nowrap; }

  /* Filas de formulario apiladas */
  .form-row, .pos-row { flex-direction: column; gap: 0; }

  /* Evitar zoom automático de iOS al enfocar campos */
  .form-input, select.form-input { font-size: 16px; }

  /* Modales cómodos en pantalla pequeña */
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92dvh; padding: 22px 18px; border-radius: 18px 18px 0 0; }
  .modal-actions { position: sticky; bottom: -22px; background: #fff; padding: 12px 0; margin-bottom: -22px; }
  .modal-actions .btn { flex: 1; }
}

@media (max-width: 520px) {
  .lp-features { grid-template-columns: 1fr; }
  .lp-hero-cta .lp-btn { width: 100%; }
  .lp-header-inner { height: 60px; }
  .lp-nav { gap: 10px; }
  .lp-nav .lp-btn { padding: 8px 13px; font-size: 13px; }
}

/* ── Contacto flotante (landing) ── */
#btn-contacto {
  position: fixed; bottom: 22px; right: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 25px; background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  box-shadow: 0 6px 20px rgba(67, 56, 202, .45); transition: transform .15s;
}
#btn-contacto:hover { transform: scale(1.08); }
#panel-contacto {
  position: fixed; bottom: 92px; right: 22px; z-index: 90;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px;
  animation: modalEntra .22s cubic-bezier(.2,.7,.3,1);
}
#panel-contacto h3 { margin: 0 0 4px; color: var(--indigo-ink); }
#panel-contacto textarea.form-input { resize: vertical; }

/* ── Franja de confianza (marcas) ── */
.lp-confia { padding: 26px 0 30px; border-top: 1px solid var(--border); background: #fff; }
.lp-confia-label {
  text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 18px;
}
.lp-confia-marcas { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; }
.lp-marca-rose { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.rose-nombre {
  font-family: Georgia, 'Times New Roman', serif; font-size: 30px; font-weight: 700;
  letter-spacing: .34em; margin-right: -.34em; color: #8E3B5C;
}
.rose-sub {
  font-size: 10px; letter-spacing: .42em; margin-right: -.42em;
  color: #8E3B5C; opacity: .8; margin-top: 3px;
}
.lp-marca-generica { color: var(--text-muted); font-size: 14px; font-weight: 600; }

/* ── Cómo funciona (3 pasos) ── */
.lp-pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 54px; }
.lp-paso {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px 22px; box-shadow: var(--shadow-sm);
}
.lp-paso-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  color: #fff; font-family: var(--font-display); font-size: 19px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(67,56,202,.3);
}
.lp-paso h3 { margin: 0 0 8px; font-size: 17px; color: var(--indigo-ink); }
.lp-paso p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* ── Testimonio ── */
.lp-testimonio {
  position: relative; max-width: 680px; margin: 0 auto; text-align: center;
  background: linear-gradient(160deg, var(--indigo-ink), var(--indigo-dark));
  color: #fff; border-radius: var(--radius); padding: 40px 36px 30px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.lp-testimonio::before {
  content: '“'; position: absolute; top: -26px; left: 18px;
  font-family: Georgia, serif; font-size: 150px; color: rgba(255,255,255,.1); pointer-events: none;
}
.lp-testimonio-texto { font-size: 18px; line-height: 1.6; margin: 0 0 18px; font-weight: 500; }
.lp-testimonio-autor {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,.75); flex-wrap: wrap;
}
.rose-nombre-mini {
  font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 17px;
  letter-spacing: .3em; margin-right: -.3em; color: #F9A8C5;
}

@media (max-width: 960px) {
  .lp-pasos { grid-template-columns: 1fr; }
  .lp-testimonio { padding: 32px 22px 26px; }
  .lp-testimonio-texto { font-size: 16px; }
  .lp-confia-marcas { gap: 24px; }
}

/* ── Barra de cuenta regresiva del trial (arriba de todo) ── */
#screen-app { grid-template-rows: auto 1fr; }
#trial-banner {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap; padding: 10px 20px; text-align: center;
  background: linear-gradient(90deg, var(--amber), #92400E);
  color: #fff; font-size: 13.5px; font-weight: 600;
  position: sticky; top: 0; z-index: 50;
}
#trial-banner.urgente { background: linear-gradient(90deg, var(--danger), #991B1B); }
#trial-banner strong { font-weight: 800; }
#trial-banner .btn {
  background: #fff; color: var(--amber); padding: 6px 14px; font-size: 12.5px;
  box-shadow: none;
}
#trial-banner.urgente .btn { color: var(--danger); }
#trial-banner .btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.18); }

@media (max-width: 960px) {
  #trial-banner { font-size: 12.5px; padding: 8px 14px; }
}
