:root {
  --color-primary: #C62828;
  --color-primary-dark: #8E0000;
  --color-primary-light: #EF5350;
  --color-primary-gradient: linear-gradient(135deg, #C62828 0%, #8E0000 100%);
  --color-secondary: #00D4FF;
  --color-secondary-dark: #00808C;
  --color-secondary-light: #33C4D0;
  --bg-dark: #0A1628;
  --bg-card: #FFFFFF;
  --bg-light: #F0F4F8;
  --text: #1A1A2E;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-pill: 50px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 15px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

.text-center { text-align: center; }

/* ─── Header / Nav ─────────────────────────────── */

.navbar-pacific {
  background: rgba(255,255,255,.98);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  backdrop-filter: blur(12px);
}

.navbar-pacific .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { height: 36px; width: auto; display: block; transition: transform .2s; }
.nav-logo:hover { transform: scale(1.04); }
.nav-logo-link { display: flex; align-items: center; text-decoration: none; }
.nav-logo-fallback { display: none; color: var(--color-primary); font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.nav-logo[style*="display:none"] + .nav-logo-fallback { display: block; }

.nav-link {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.nav-link:hover { color: var(--color-primary); background: rgba(198,40,40,.06); text-decoration: none; }

/* ─── Hero ────────────────────────────────────── */

.hero-pacific {
  background: var(--color-primary-gradient);
  padding: 48px 0 36px;
  position: relative;
  overflow: hidden;
}
.hero-pacific::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255,255,255,.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(255,255,255,.05) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-pacific::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
}

.hero-title {
  color: #fff;
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 4px;
  margin: 0;
  text-transform: uppercase;
  position: relative;
}
.hero-title b { font-weight: 900; color: var(--color-secondary-light); }

/* ─── Steps ────────────────────────────────────── */

.steps-bar {
  background: #fff;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.step-col {
  flex: 1;
  max-width: 160px;
  text-align: center;
  padding: 0 8px;
}

.step-icon-wrap {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.step-col.active .step-icon-wrap {
  background: var(--color-primary);
  box-shadow: 0 0 0 5px rgba(198,40,40,.15);
  transform: scale(1.05);
}
.step-col.completed .step-icon-wrap { background: #10B981; }

.step-num {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.step-col.completed .step-num i { font-size: 14px; }

.steps-bar h3 {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: .8px;
  transition: color .3s;
}
.steps-bar .active h3 { color: var(--color-primary); }
.steps-bar .completed h3 { color: #059669; }

.step-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
  margin-bottom: 24px;
  transition: background .3s ease;
}
.step-line.completed { background: #10B981; }

/* ─── Content Card ────────────────────────────── */

.content-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -12px;
  position: relative;
  z-index: 5;
  overflow: hidden;
  transition: box-shadow .3s;
}
.content-card:hover { box-shadow: var(--shadow-lg); }

/* ─── Service Tabs ────────────────────────────── */

.service-tabs {
  display: flex;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.service-tab {
  flex: 1;
  text-align: center;
  padding: 18px 12px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .25s;
  border-bottom: 3px solid transparent;
  position: relative;
}
.service-tab:hover { color: var(--color-primary); text-decoration: none; background: #fff; }
.service-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); background: #fff; }

.service-tab i { display: block; font-size: 24px; margin-bottom: 6px; }
.service-tab span { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }

/* ─── Service Panel ───────────────────────────── */

.service-panel {
  padding: 44px 36px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.panel-icon {
  width: 68px;
  height: 68px;
  background: var(--color-primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 4px 12px rgba(198,40,40,.25);
}
.panel-icon i { font-size: 30px; color: #fff; }

.panel-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.panel-desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ─── Form ────────────────────────────────────── */

.form-pago { max-width: 420px; margin: 0 auto; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.input-group-pago {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.input-group-pago:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(198,40,40,.1);
}

.input-icon {
  padding: 0 0 0 18px;
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  align-self: stretch;
}

.form-control {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font);
  padding: 14px 12px;
  background: transparent;
  color: var(--text);
}
.form-control::placeholder { color: #cbd5e1; font-weight: 400; }

.form-help {
  display: block;
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── Buttons ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all .25s;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }

.btn-pacific {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 22px;
  border-radius: 0;
  min-height: 50px;
  font-weight: 600;
}
.input-group-pago .btn-pacific { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.btn-pacific:hover { background: var(--color-primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(198,40,40,.35); }

.btn-whatsapp-pacific {
  background: var(--whatsapp);
  color: #fff;
  border-radius: var(--radius-sm);
}
.btn-whatsapp-pacific:hover { background: #20bd5c; color: #fff; box-shadow: 0 4px 12px rgba(37,211,102,.35); }

.btn-outline-pacific {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline-pacific:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(198,40,40,.06); }

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: var(--radius-sm); }
.btn-back { color: var(--text-light); font-size: 13px; }
.btn-back:hover { color: var(--color-primary); text-decoration: none; background: none; }

/* ─── Payment Methods ─────────────────────────── */

.payment-methods {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.pm-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  font-weight: 600;
}

.pm-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pm-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  transition: all .25s;
}
.pm-item i { font-size: 15px; }
.pm-item:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(198,40,40,.06); }

/* ─── Support ─────────────────────────────────── */

.support-section { margin: 24px 0 48px; }

.support-card-pacific {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
}
.support-card-pacific:hover { box-shadow: var(--shadow); }

@media (max-width: 600px) { .support-card-pacific { flex-direction: column; text-align: center; } }

.support-left h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.support-left h3 i { color: var(--color-primary); margin-right: 8px; }
.support-left p { font-size: 14px; color: var(--text-light); }

.support-right { display: flex; gap: 10px; flex-shrink: 0; }
.support-right .btn { padding: 10px 20px; font-size: 14px; }

/* ─── Footer ──────────────────────────────────── */

.footer-pacific {
  background: #0A1628;
  padding: 32px 0 20px;
  color: rgba(255,255,255,.7);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 600px) { .footer-row { flex-direction: column; text-align: center; } }

.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 30px; width: auto; }
.footer-brand .nav-logo-fallback { color: rgba(255,255,255,.85); font-size: 18px; font-weight: 900; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.45); }

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer-links a:hover { color: var(--color-secondary-light); text-decoration: none; }
.footer-links a i { margin-right: 5px; }

.footer-copy { text-align: center; padding-top: 20px; }
.footer-copy p { font-size: 12px; color: rgba(255,255,255,.3); }

/* ─── Cliente ──────────────────────────────────── */

.cliente-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.cliente-avatar {
  width: 50px;
  height: 50px;
  background: var(--color-primary-gradient);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(198,40,40,.2);
}

.cliente-card h2 { font-size: 17px; font-weight: 700; }
.cliente-tel { font-size: 14px; color: var(--text-light); margin-top: 3px; }

/* ─── Alertas ──────────────────────────────────── */

.alerta {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.alerta a { font-weight: 700; }

.alerta-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}
.alerta-warning a { color: #92400E; }

.alerta-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.alerta-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.alerta-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}

/* ─── Section ──────────────────────────────────── */

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* ─── Facturas ─────────────────────────────────── */

.facturas-list { display: flex; flex-direction: column; gap: 12px; }

.factura-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s, transform .3s;
}
.factura-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.factura-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.factura-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
  margin-bottom: 2px;
}

.factura-num { font-size: 15px; font-weight: 700; letter-spacing: -.3px; }

.factura-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-draft { background: #F3F4F6; color: #374151; }
.status-partial { background: #DBEAFE; color: #1E40AF; }
.status-paid { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

.factura-body { padding: 16px 20px; }

.factura-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) { .factura-grid { grid-template-columns: 1fr 1fr; } }

.factura-dato-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 3px;
}

.factura-dato { font-size: 14px; font-weight: 600; }
.factura-dato.vencida { color: #EF4444; font-weight: 700; }

.factura-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
}

.btn-pagar {
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.consulta-ayuda {
  text-align: center;
  margin-top: 28px;
  padding: 18px;
  font-size: 14px;
  color: var(--text-light);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.consulta-ayuda a { font-weight: 700; }

/* ─── Pago ─────────────────────────────────────── */

.pago-wrap {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.pago-card {
  max-width: 440px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.pago-resumen { margin-bottom: 24px; }

.pago-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}
.pago-row span { color: var(--text-light); }

.pago-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.pago-total { padding-top: 10px; }
.pago-monto { font-size: 22px; font-weight: 800; color: var(--color-primary); }

.pago-actions { margin-top: 12px; }

.pago-seguro {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ─── Resultado ────────────────────────────────── */

.result-wrap {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.result-card {
  max-width: 440px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 36px;
  box-shadow: var(--shadow-lg);
}

.result-icon { margin-bottom: 20px; }
.result-icon i { font-size: 52px; }
.result-success { color: var(--color-primary); }
.result-error { color: #EF4444; }
.result-pending { color: #F59E0B; }

.result-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-text {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.result-ref {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: 12px 0 24px;
  font-family: monospace;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.result-card .btn { min-width: 160px; }

/* ─── Responsive ───────────────────────────────── */

@media (max-width: 640px) {
  .hero-title { font-size: 24px; letter-spacing: 2px; }
  .hero-pacific { padding: 32px 0 24px; }
  .service-panel { padding: 32px 20px; }
  .service-tab { padding: 14px 8px; }
  .service-tab i { font-size: 20px; }
  .service-tab span { font-size: 10px; }
  .step-col { max-width: 72px; }
  .steps-bar h3 { font-size: 8px; letter-spacing: 0; }
  .step-line { max-width: 14px; margin: 0 2px; margin-bottom: 24px; }
  .step-icon-wrap { width: 26px; height: 26px; }
  .step-num { font-size: 11px; }
  .step-col.completed .step-num i { font-size: 11px; }
  .pago-card { padding: 28px 20px; }
  .result-card { padding: 36px 24px; }
  .result-actions .btn { width: 100%; }
}

/* ─── Smooth Scroll ─────────────────────────────── */

html { scroll-behavior: smooth; }

/* ─── Loading Spinner ──────────────────────────── */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-loading {
  pointer-events: none;
  opacity: .85;
  position: relative;
}

/* ─── Animations ───────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-up { animation: fadeUp .4s ease both; }
.animate-fade-in { animation: fadeIn .4s ease both; }

.content-card,
.pago-card,
.result-card,
.cliente-card,
.factura-card,
.support-card-pacific {
  animation: fadeUp .45s ease both;
}
.factura-card:nth-child(2) { animation-delay: .06s; }
.factura-card:nth-child(3) { animation-delay: .12s; }
.factura-card:nth-child(4) { animation-delay: .18s; }
.factura-card:nth-child(5) { animation-delay: .24s; }

/* ─── Improved Focus / Accessibility ──────────── */

.form-control:focus {
  box-shadow: 0 0 0 4px rgba(198,40,40,.1);
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ─── Floating WhatsApp ──────────────────────────── */

.float-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, .45);
  z-index: 999;
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
}
.float-whatsapp:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, .5);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 480px) {
  .float-whatsapp {
    width: 50px;
    height: 50px;
    font-size: 24px;
    bottom: 18px;
    right: 18px;
  }
}
