/* =====================================================================
   WG PAY — estilos
   PALETA DE COLORES: cambia solo estas variables para aplicar tu marca.
   ===================================================================== */
:root {
  --primary: #FFD100;       /* amarillo WG (botones de acción, destacados) */
  --primary-dark: #E6BC00;
  --on-primary: #0B0B0B;    /* texto sobre amarillo */
  --accent-text: #9A7400;   /* amarillo oscuro legible sobre blanco */
  --secondary: #0B0B0B;     /* negro WG (botones, encabezado) */
  --secondary-dark: #2A2A2A;
  --ink: #0B0B0B;           /* texto principal */
  --muted: #6B6B6B;         /* texto secundario */
  --bg: #F7F7F5;            /* fondo */
  --surface: #FFFFFF;       /* tarjetas */
  --line: #E6E6E1;          /* bordes */
  --soft: #FFF6CC;          /* fondo amarillo suave */
  --warn: #F59E0B;
  --danger: #E5484D;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Nunito", "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--accent-text); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Botones e inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 700; cursor: pointer; transition: .15s; }
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: var(--secondary-dark); }
.btn-green { background: var(--primary); color: var(--on-primary); }
.btn-green:hover { background: var(--primary-dark); }
.btn-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: .9rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.input, select.input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: var(--surface); color: var(--ink); }
.input:focus { outline: none; border-color: var(--primary); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.alert { padding: 10px 14px; border-radius: 10px; background: #FDECEC; color: var(--danger); font-size: .92rem; margin-bottom: 12px; }
.alert.ok { background: var(--soft); color: var(--accent-text); }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .container, .topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.topbar-inner { padding: 0 16px; }
.logo img { height: 38px; display: block; }
.rate-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--muted); }
.rate-pill .dot { width: 22px; height: 22px; border-radius: 50%; background: #26A17B; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.badge-binance { display: inline-block; background: var(--ink); color: var(--primary); font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; margin-right: 6px; }

/* ---------- Portada ---------- */
.hero { background: radial-gradient(1200px 500px at 80% 0%, var(--soft), transparent), var(--bg); padding: 56px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.hero h1 .g { background: var(--primary); padding: 0 .15em; border-radius: 6px; } .hero h1 .b { text-decoration: underline 6px var(--primary); text-underline-offset: 4px; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 540px; }
.marquee { overflow: hidden; background: var(--ink); color: #fff; padding: 14px 0; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 48px; animation: scroll 30s linear infinite; }
.marquee-track span::before { content: "✦ "; color: var(--primary); }
@keyframes scroll { to { transform: translateX(-50%); } }
.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.method { text-align: center; padding: 18px 10px; }
.method .ico { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.footer { background: var(--ink); color: #C9D3E0; padding: 40px 0; font-size: .95rem; }
.footer a { color: var(--primary); }

/* ---------- Calculadora ---------- */
.calc { display: grid; gap: 8px; }
.calc-label { font-weight: 700; font-size: .95rem; }
.calc-row { display: grid; grid-template-columns: auto 1fr minmax(130px, 46%); align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.calc-row:focus-within { border-color: var(--primary); }
.calc-cur { padding-left: 14px; font-weight: 800; color: var(--muted); }
.calc-input { border: 0; padding: 14px 10px; font: inherit; font-size: 1.25rem; font-weight: 700; min-width: 0; outline: none; background: transparent; color: var(--ink); }
.calc-swap { justify-self: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.1rem; color: var(--secondary); }
.calc-info { background: var(--bg); border-radius: 12px; padding: 10px 14px; display: grid; gap: 4px; font-size: .92rem; margin: 6px 0; }
.calc-info div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.calc-info span { color: var(--muted); }
.calc-error { color: var(--danger); font-size: .9rem; margin: 0; }
.calc-note { text-align: center; color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 400px at 20% 0%, var(--soft), transparent), var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card .logo { display: flex; justify-content: center; margin-bottom: 18px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; padding: 10px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Panel de usuario ---------- */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 64px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; }
.profile { text-align: center; padding: 18px 8px; border-radius: var(--radius); background: linear-gradient(160deg, var(--soft), transparent); margin-bottom: 18px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; border: 3px solid var(--primary); color: var(--primary); }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; }
.side-nav a:hover { background: var(--bg); }
.side-nav a.active { color: var(--ink); font-weight: 800; box-shadow: inset 4px 0 0 var(--primary); background: var(--soft); }
.side-nav svg { width: 22px; height: 22px; }
.main { padding: 24px; min-width: 0; }
.banner { position: relative; border-radius: var(--radius); overflow: hidden; background: linear-gradient(120deg, #fff 0%, var(--soft) 60%, #FFE680 100%); min-height: 190px; margin-bottom: 22px; border: 1px solid var(--line); }
.slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 28px 40px; opacity: 0; transition: opacity .6s; }
.slide.on { opacity: 1; }
.slide h2 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 600; max-width: 640px; }
.slide .g { background: var(--primary); padding: 0 .15em; border-radius: 6px; } .slide .b { text-decoration: underline 5px var(--primary); text-underline-offset: 4px; }
.dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #cfcfc8; }
.dots i.on { background: var(--primary); }
.steps-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.steps-head h3 { font-weight: 600; margin: 0; }
.steps-head h3 b { color: var(--accent-text); }
.steps { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: start; gap: 8px; }
.step { text-align: center; width: 110px; font-size: .9rem; color: var(--muted); }
.step .n { width: 40px; height: 40px; border-radius: 50%; background: #B5B5AE; color: #fff; display: grid; place-items: center; margin: 0 auto 6px; font-weight: 800; font-size: 1.2rem; }
.step.done { color: var(--ink); font-weight: 700; } .step.done .n { background: var(--primary); color: var(--on-primary); }
.bar { height: 6px; border-radius: 6px; background: #D9D9D2; margin-top: 17px; }
.bar.done { background: var(--primary); }
.tx-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 14px; align-items: center; }
.tx-tab { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 22px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.tx-tab.active { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.search { flex: 1; min-width: 200px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: left; background: var(--soft); padding: 14px; font-size: .92rem; }
td { padding: 14px; border-top: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status.pendiente { background: #FEF3C7; color: #92400E; }
.status.en_progreso { background: #E8E8E8; color: var(--secondary-dark); }
.status.completado { background: var(--soft); color: var(--accent-text); }
.status.cancelado { background: #FDECEC; color: var(--danger); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.summary { display: grid; gap: 8px; font-size: .95rem; }
.summary div { display: flex; justify-content: space-between; gap: 10px; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal .card { width: min(460px, 100%); text-align: center; }
.code { font-size: 1.8rem; font-weight: 800; letter-spacing: 2px; color: var(--ink); background: var(--primary); border-radius: 12px; padding: 6px; margin: 8px 0 16px; }
.menu-btn { display: none; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 64px; bottom: 0; left: 0; width: 240px; z-index: 30; transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: block; }
  .rate-pill .long { display: none; }
  .main { padding: 16px; }
  .slide { padding: 20px; }
}
@media (max-width: 560px) {
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .step { width: 76px; font-size: .78rem; }
  .calc-row { grid-template-columns: auto 1fr; }
}

/* ---------- Marca WG: encabezado negro con logo ---------- */
.topbar { background: var(--ink); border-bottom: 3px solid var(--primary); }
.topbar .rate-pill { color: #E8E8E8; }
.topbar .btn-primary { background: var(--primary); color: var(--on-primary); }
.topbar .btn-primary:hover { background: var(--primary-dark); }
.topbar .menu-btn { color: #fff; }
.logo img { height: 46px; }
.btn-green { box-shadow: 0 4px 0 var(--primary-dark); }
.footer { border-top: 3px solid var(--primary); }
.auth-card .logo img { background: var(--ink); border-radius: 999px; padding: 6px 10px; height: 64px !important; }

/* ---------- Selector de método con logo ---------- */
.mpick { position: relative; align-self: stretch; min-width: 0; }
.mpick-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; min-height: 54px; padding: 0 12px; border: 0; border-left: 1.5px solid var(--line); border-radius: 0 12px 12px 0; background: var(--bg); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.mpick-btn:hover { background: var(--soft); }
.mpick-btn img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.mpick-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpick-btn i { font-style: normal; color: var(--muted); }
.mpick-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 290px; max-width: calc(100vw - 32px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.mpick-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.mpick-list li:hover { background: var(--bg); }
.mpick-list li[aria-selected="true"] { background: var(--soft); box-shadow: inset 3px 0 0 var(--primary); }
.mpick-list img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.mpick-list small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.mchip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mchip img { width: 22px; height: 22px; border-radius: 6px; }
.method img.logo { width: 52px; height: 52px; border-radius: 14px; display: block; margin: 0 auto 10px; }
@media (max-width: 560px) {
  .mpick { grid-column: 1 / -1; }
  .mpick-btn { border-left: 0; border-top: 1.5px solid var(--line); border-radius: 0 0 12px 12px; }
  .mpick-list { left: 0; right: 0; width: auto; }
}

/* =====================================================================
   MULTIDISPOSITIVO: PC de escritorio, laptop, iPad/tablet y celular
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
.input, select.input, .calc-input { font-size: max(16px, 1em); }  /* evita el zoom automático en iPhone */
.btn-sm { min-height: 40px; }
.side-nav a { min-height: 48px; }
.topbar { padding-top: env(safe-area-inset-top); }
.topbar-inner, .main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.main > section { max-width: 1320px; margin-inline: auto; }
.sidebar { overflow-y: auto; }
.btn, .tx-tab, .mpick-btn, .mpick-list li, .side-nav a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* PC grandes (monitores anchos) */
@media (min-width: 1600px) {
  .container { width: min(1360px, 100% - 64px); }
  .app { grid-template-columns: 260px 1fr; }
}

/* Laptops pequeñas y iPad horizontal */
@media (max-width: 1100px) {
  .app { grid-template-columns: 210px 1fr; }
  .hero-grid { gap: 28px; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

/* iPad vertical y tablets: menú lateral desplegable con fondo oscuro */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { top: calc(64px + env(safe-area-inset-top)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  body.menu-open { overflow: hidden; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
  .hero { padding: 36px 0; }
  .section { padding: 44px 0; }
}

/* Tablas → tarjetas en celulares y iPad vertical */
@media (max-width: 900px) {
  .table-wrap { background: transparent; border: 0; overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
  td { border: 0; border-top: 1px dashed var(--line); padding: 10px 0; }
  tr td:first-child { border-top: 0; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
  td.cell-title { font-size: 1.1rem; }
  td.empty { text-align: center; border: 0; }
  td select.input { width: 100%; }
  .tbl-inline td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .tbl-inline td[data-label]::before { margin: 0; text-align: left; flex: none; }
  td.cell-actions { display: flex; gap: 8px; border-top: 0; padding-top: 4px; }
  td.cell-actions .btn { flex: 1; }
  .tx-tabs { gap: 8px; }
  .tx-tab { flex: 1 1 auto; padding: 9px 12px; font-size: .9rem; }
  .search { flex-basis: 100%; order: 5; }
}

/* Celulares */
@media (max-width: 560px) {
  .topbar .container, .topbar-inner { gap: 8px; height: 58px; }
  .logo img { height: 38px; }
  .rate-pill { font-size: .78rem; }
  .rate-pill .dot { display: none; }
  .sidebar { top: calc(58px + env(safe-area-inset-top)); }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 6px 12px; }
  .hero h1 { font-size: 1.9rem; }
  .card { padding: 18px; }
  .banner { min-height: 150px; }
  .slide h2 { font-size: 1.25rem; }
  .steps-head .btn { width: 100%; }
  .steps { gap: 4px; }
  .modal .card { padding: 22px 18px; }
  .code { font-size: 1.5rem; }
  .footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* Celulares muy pequeños (iPhone SE, 320px) */
@media (max-width: 360px) {
  .rate-pill { display: none; }
  .step { width: 64px; font-size: .72rem; }
  .step .n { width: 34px; height: 34px; font-size: 1rem; }
  .bar { margin-top: 14px; }
}
@media (max-width: 560px) { .nav-actions .long { display: none; } }
.rate-pill { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar .container .rate-pill { display: none; }   /* portada: la tasa ya se ve en la calculadora */
}
@media (min-width: 561px) and (max-width: 900px) {
  .table-wrap tbody { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .table-wrap tr { margin: 0; }
  .table-wrap td.empty { grid-column: 1 / -1; }
}

/* ---------- Continuar con Google ---------- */
.btn-google { background: #fff; color: #1F1F1F; border: 1.5px solid var(--line); gap: 10px; }
.btn-google:hover { border-color: #BDBDBD; background: #FAFAFA; }
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Logos de métodos (imágenes PNG/SVG): fondo blanco para los que son transparentes */
.mpick-btn img, .mpick-list img, .mchip img, .method img.logo { background: #fff; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }

/* Encabezado de la calculadora con botón Reiniciar */
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calc-reset { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 32px; }
.calc-reset:hover { border-color: var(--primary); color: var(--ink); background: var(--soft); }
.calc-input::placeholder { color: #B5B5AE; }
