/* ===== AIRLINK Pagos — estilo app móvil (modo oscuro de marca) ===== */
:root {
  --bg: #0c0e0c;
  --surface: #151815;
  --surface-2: #1d211c;
  --line: #2b312a;
  --fg: #eef2ea;
  --muted: #8b968a;
  --accent: #bccc2c;
  --accent-hover: #cbd94a;
  --accent-ink: #15180a;
  --success: #58c06a;
  --danger: #ff5d5d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --maxw: 440px;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(188,204,44,.10), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
button { font-family: inherit; }

/* ---- Marco de dispositivo ---- */
.device {
  width: 100%; max-width: var(--maxw); margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; position: relative; background: var(--bg);
}
@media (min-width: 480px) {
  body { padding-block: 24px; }
  .device {
    min-height: min(880px, calc(100vh - 48px));
    height: min(880px, calc(100vh - 48px));
    border: 1px solid var(--line); border-radius: 34px; box-shadow: var(--shadow); overflow: hidden;
  }
}

/* ---- Barra superior ---- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: rgba(12,14,12,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.appbar .brand-logo { height: 26px; width: auto; display: block; }
.icon-btn {
  margin-left: auto; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: 11px; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:active { transform: scale(.94); }
.back-btn {
  width: 38px; height: 38px; flex: none; margin-left: -2px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  border-radius: 11px; cursor: pointer; display: none; place-items: center;
}
.back-btn.show { display: grid; }

/* ---- Stepper ---- */
.stepper { display: flex; align-items: center; gap: 6px; padding: 12px 16px 2px; }
.stepper .seg { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.stepper .seg.on { background: var(--accent); }
.step-label { padding: 6px 16px 0; font-size: .74rem; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; font-weight: 600; }

/* ---- Pantallas ---- */
.screens { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen { padding: 18px 16px 24px; animation: slide .32s ease both; }
@keyframes slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .screen, .success-ring svg, .modal-overlay, .sheet { animation: none !important; } }

.lead { color: var(--muted); font-size: .92rem; margin: 2px 0 18px; line-height: 1.45; }
h1.title { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
h2.title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }

/* ---- Buscar ---- */
.hero-logo { text-align: center; padding: 22px 0 10px; }
.hero-logo .hero-img { width: 62%; max-width: 230px; height: auto; display: block; margin: 0 auto 18px; }
.field-label { font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: 7px; display: block; }
.doc-input { display: flex; gap: 8px; margin-bottom: 14px; }
.doc-input select {
  flex: none; width: 64px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: 12px; font-size: 1.05rem; font-weight: 700; text-align: center; padding: 0 6px; appearance: none; cursor: pointer;
}
.doc-input input {
  flex: 1; min-width: 0; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 14px; font-size: 1.1rem; letter-spacing: .5px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input::placeholder { color: #5f6a5e; }

/* ---- Botones ---- */
.btn {
  width: 100%; border: none; cursor: pointer; border-radius: 14px; padding: 16px;
  font-size: 1.02rem; font-weight: 700; font-family: var(--font-display);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .08s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(21,24,10,.3); border-top-color: var(--accent-ink);
  animation: spin .7s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.inline-error {
  background: rgba(255,93,93,.1); border: 1px solid rgba(255,93,93,.4); color: #ff9a9a;
  border-radius: 12px; padding: 11px 13px; font-size: .86rem; margin-top: 12px; line-height: 1.4;
}

/* ---- Tarjetas de recibo / servicio ---- */
.client-chip {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px;
}
.client-chip .avatar {
  width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--surface-2);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--accent);
}
.client-chip .name { font-weight: 700; font-size: .98rem; }
.client-chip .sub { font-size: .8rem; color: var(--muted); }

.quick-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.quick-row .cnt { font-size: .82rem; color: var(--muted); }
.link-btn { background: none; border: none; color: var(--accent); font-weight: 700; font-size: .85rem; cursor: pointer; padding: 4px; }

.recibo {
  display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; cursor: pointer; color: var(--fg);
  transition: border-color .2s, background .2s;
}
.recibo.sel { border-color: var(--accent); background: linear-gradient(0deg, rgba(188,204,44,.07), rgba(188,204,44,.07)), var(--surface); }
.recibo .check {
  width: 24px; height: 24px; flex: none; margin-top: 2px; border-radius: 8px; border: 2px solid var(--line);
  display: grid; place-items: center; transition: .2s;
}
.recibo.sel .check { background: var(--accent); border-color: var(--accent); }
.recibo .check svg { opacity: 0; transition: .15s; }
.recibo.sel .check svg { opacity: 1; }
.recibo .meta { flex: 1; min-width: 0; }
.recibo .meta .mes-head { font-weight: 700; font-size: .96rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.recibo .meta .line { font-size: .85rem; color: var(--muted); padding: 5px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.recibo .meta .line .lm { min-width: 0; }
.recibo .meta .line .lm .mes { color: var(--fg); font-weight: 700; }
.recibo .meta .line .lp { color: var(--fg); font-family: var(--font-display); font-weight: 700; }
.recibo .meta .gtotal { display: block; text-align: right; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.recibo .meta .gtotal b { color: var(--fg); font-family: var(--font-display); }

.status-badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .4px; }
.status-badge.active { background: rgba(88,192,106,.15); color: var(--success); }
.status-badge.suspended { background: rgba(255,93,93,.15); color: #ff9a9a; }

.no-services { color: var(--muted); text-align: center; padding: 20px; }

/* ---- Métodos (tabs) ---- */
.seg-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin-bottom: 18px;
}
.seg-tabs button {
  border: none; background: none; color: var(--muted); font-weight: 700; font-size: .86rem;
  padding: 10px 4px; border-radius: 10px; cursor: pointer; font-family: var(--font-display); transition: .2s;
}
.seg-tabs button.on { background: var(--accent); color: var(--accent-ink); }

.amount-card { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.amount-card .v { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; letter-spacing: -.5px; }
.amount-card .v.usd { color: var(--accent); }

.data-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.data-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: none; }
.data-row .dk { font-size: .78rem; color: var(--muted); }
.data-row .dv { font-weight: 700; font-size: .92rem; margin-top: 1px; word-break: break-all; }
.data-row .txt { flex: 1; min-width: 0; }
.data-row.monto .dv { color: var(--accent); font-family: var(--font-display); font-size: 1rem; }
.copy-btn {
  flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--fg); cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.copy-btn:active { transform: scale(.9); }
.copy-btn.done { background: var(--success); border-color: var(--success); color: #07140a; }

.copy-all {
  width: 100%; margin: 0 0 14px; border: 1px solid var(--accent); background: rgba(188,204,44,.08);
  color: var(--accent); font-weight: 700; font-family: var(--font-display); font-size: .9rem;
  border-radius: 12px; padding: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .15s;
}
.copy-all:active { transform: scale(.98); }
.copy-all.done { background: var(--success); border-color: var(--success); color: #07140a; }

.note { font-size: .82rem; color: var(--muted); text-align: center; margin: 0 0 14px; line-height: 1.45; }

.form-group { margin-bottom: 14px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; font-size: 1rem;
}
.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: none; width: 92px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; font-weight: 700; padding: 0 8px; appearance: none; }
.phone-row input { flex: 1; min-width: 0; }

.dropzone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; transition: .2s; background: var(--surface); }
.dropzone:hover { border-color: var(--accent); }
.dropzone .dz-ic { color: var(--accent); margin-bottom: 6px; }
.dropzone .dz-t { font-weight: 700; font-size: .9rem; }
.dropzone .dz-s { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.dropzone.has-file { border-style: solid; border-color: var(--success); }
.dropzone.has-file .dz-t { color: var(--success); }

/* ---- CTA fijo ---- */
.cta-bar {
  position: sticky; bottom: 0; z-index: 15;
  padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, var(--bg) 70%, transparent); border-top: 1px solid var(--line);
}
.cta-bar .total-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.cta-bar .total-line .tk { font-size: .82rem; color: var(--muted); }
.cta-bar .total-line .tv { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }

/* ---- Modales / hojas ---- */
.modal-overlay { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.modal-overlay.show { display: flex; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: var(--maxw); background: var(--surface); border-radius: 22px 22px 0 0;
  border: 1px solid var(--line); border-bottom: none;
  padding: 10px 18px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  animation: rise .3s ease both; max-height: 92%; overflow-y: auto;
}
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .grip { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet h3 { font-size: 1.15rem; margin-bottom: 14px; }
.confirm-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.confirm-row .ck { color: var(--muted); font-size: .86rem; flex: none; }
.confirm-row .cv { font-weight: 700; font-size: .9rem; text-align: right; word-break: break-word; }
.confirm-row.hl .cv { color: var(--accent); font-size: 1.05rem; font-family: var(--font-display); }

/* ---- Éxito ---- */
.success-wrap { text-align: center; padding: 40px 20px; animation: slide .32s both; }
.success-ring { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; background: rgba(88,192,106,.12); display: grid; place-items: center; }
.success-ring svg { animation: pop .4s .1s ease both; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.success-wrap h2 { font-size: 1.5rem; margin-bottom: 8px; }
.success-wrap p { color: var(--muted); line-height: 1.5; margin: 0 0 20px; }
.receipt-mini { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; margin: 0 0 20px; }
.receipt-mini .rm-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.receipt-mini .rm-row:last-child { border-bottom: none; }
.receipt-mini .rk { color: var(--muted); font-size: .84rem; }
.receipt-mini .rv { font-weight: 700; font-size: .9rem; text-align: right; }
.receipt-mini .rv.hl { color: var(--accent); font-family: var(--font-display); }

/* ---- Comprobante ---- */
.comprobante { background: #fff; color: #16180e; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.comprobante .cp-head { background: #15180e; padding: 18px; text-align: center; }
.comprobante .cp-head img { height: 30px; width: auto; }
.comprobante .cp-body { padding: 16px 18px; }
.comprobante .cp-status { display: inline-flex; align-items: center; gap: 6px; background: #eaf4d6; color: #4a6b10; font-weight: 700; font-size: .76rem; padding: 5px 11px; border-radius: 20px; margin-bottom: 14px; }
.comprobante .cp-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #e2e4d5; font-size: .86rem; }
.comprobante .cp-row:last-child { border-bottom: none; }
.comprobante .cp-row .ck { color: #6b7158; }
.comprobante .cp-row .cv { font-weight: 700; text-align: right; word-break: break-word; }
.comprobante .cp-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 2px solid #15180e; }
.comprobante .cp-total .ck { font-size: .8rem; color: #6b7158; text-transform: uppercase; letter-spacing: .5px; }
.comprobante .cp-total .cv { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.comprobante .cp-foot { text-align: center; font-size: .72rem; color: #8a8f78; padding: 0 18px 16px; line-height: 1.4; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: #e9f0da; color: #1a2008; font-weight: 700; font-size: .85rem; padding: 11px 18px; border-radius: 30px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 60; max-width: 86%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#copyright { text-align: center; color: var(--muted); font-size: .78rem; padding: 14px; }
@media (min-width: 480px) { #copyright { display: none; } }
