/* ==========================================================
   Drop · Mi cuenta (portal de clientes)
   Misma identidad que drop.net.ar: traje (tinta), corbata (azul),
   anteojos (rojo), pelaje (marrón), globos con letra de Drop.
   ========================================================== */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url("../fonts/shantell.woff2") format("woff2-variations"); font-weight: 300 800; font-display: swap; }

:root {
  --paper: #F5F7FC;
  --paper-2: #FFFFFF;
  --ink: #1C1F27;
  --ink-soft: #4A5063;
  --tie: #2457D6;
  --tie-deep: #183C9C;
  --lens: #E5352B;
  --fur: #7A4B2A;
  --sky: #E3EBFB;
  --line: #D3DAE8;
  --ok: #1E8E4E;
  --ok-bg: #E2F4E8;
  --warn: #9A6200;
  --warn-bg: #FFF2D6;
  --bad: #B3221A;
  --bad-bg: #FDE7E5;

  --f-sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Shantell Sans", "Comic Sans MS", system-ui, sans-serif;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --stroke: 2px solid var(--ink);
  --pop: 3px 3px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 40px);
  --tabbar-h: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-sans); font-size: 16.5px; line-height: 1.5; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tie); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 750; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-variation-settings: "opsz" 96; letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lens); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 650 1rem/1 var(--f-sans); padding: .9em 1.4em; border-radius: 999px; border: var(--stroke);
  text-decoration: none; cursor: pointer; white-space: nowrap; color: var(--ink); background: var(--paper-2);
  box-shadow: var(--pop); transition: transform .12s ease, box-shadow .12s ease, background-color .15s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:hover { background: var(--sky); }
.btn--primary { background: var(--tie); color: #fff; }
.btn--primary:hover { background: var(--tie-deep); }
.btn--wa { background: #25D366; color: var(--ink); }
.btn--wa:hover { background: #1fbd5a; }
.btn--sm { padding: .6em 1em; font-size: .9rem; box-shadow: 2px 2px 0 var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--tie); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Globo de diálogo ---------- */
.bubble {
  position: relative; display: inline-block; background: #fff; border: 2.5px solid var(--ink);
  border-radius: 26px 30px 24px 32px / 30px 24px 32px 26px; padding: .7em 1em;
  font-family: var(--f-hand); font-weight: 500; font-size: 1rem; line-height: 1.35; color: var(--ink);
  max-width: 19rem; margin: 0; text-align: left;
}
.bubble::after {
  content: ""; position: absolute; width: 18px; height: 18px; background: #fff;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  bottom: -11px; left: 38px; transform: rotate(45deg) skew(8deg, 8deg);
}

/* ---------- Ingreso ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__side {
  background: var(--tie); color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px clamp(24px, 5vw, 64px); position: relative; overflow: hidden;
}
.auth__side::before { content: ""; position: absolute; left: 50%; bottom: -25%; width: 110%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--tie-deep); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: var(--sky); border: 2px solid var(--ink); object-fit: cover; object-position: top; }
.brand span { font-weight: 800; font-size: 1.55rem; letter-spacing: -0.05em; font-variation-settings: "opsz" 96; }
.auth__side .brand { color: #fff; position: relative; }
.auth__side .brand img { border-color: #fff; }
.auth__art { position: relative; display: flex; flex-direction: column; align-items: center; }
.auth__art img { width: min(100%, 300px); max-height: 52vh; object-fit: contain; }
.auth__art .bubble { margin-bottom: 14px; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.auth__box { width: 100%; max-width: 420px; }
.auth__box h1 { margin-bottom: 10px; }
.auth__box > p { color: var(--ink-soft); margin-bottom: 24px; }
.auth__alt { margin-top: 26px; padding-top: 18px; border-top: 1.5px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
.auth__row { display: flex; justify-content: flex-end; margin: -6px 0 20px; font-size: .95rem; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label, .label { font-weight: 650; font-size: .95rem; }
.hint { font-size: .85rem; color: var(--ink-soft); }
input, select, textarea {
  font: 500 1rem/1.3 var(--f-sans); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .8em .95em; width: 100%; min-height: 50px;
  transition: border-color .15s, background-color .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #AEB8CE; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tie); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tie) 22%, transparent); }
.is-invalid { border-color: var(--lens) !important; background: #FFF5F4 !important; }
.invalid-feedback { color: var(--bad); font-weight: 600; font-size: .9rem; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%231C1F27' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.pw button { position: absolute; right: 8px; top: 25px; transform: translateY(-50%); background: none; border: 0; font: 600 .9rem var(--f-sans); color: var(--tie); cursor: pointer; padding: 8px; }
.fuerza { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 2px; }
.fuerza span { display: block; height: 100%; width: 10%; background: var(--lens); transition: width .2s, background .2s; }
.fuerza[data-nivel="1"] span { width: 35%; background: #F08C2B; }
.fuerza[data-nivel="2"] span { width: 60%; background: #E8B923; }
.fuerza[data-nivel="3"] span { width: 85%; background: #36B37E; }
.fuerza[data-nivel="4"] span { width: 100%; background: var(--ok); }

/* Opciones grandes tipo tarjeta (motivo del reclamo) */
.opciones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; min-height: 0; }
.opcion span {
  display: flex; align-items: center; gap: 10px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: var(--paper-2); font-weight: 600; font-size: .95rem; line-height: 1.2;
}
.opcion i { font-size: 1.3rem; color: var(--tie); }
.opcion input:checked + span { border: var(--stroke); background: var(--sky); box-shadow: 2px 2px 0 var(--ink); }
.opcion input:focus-visible + span { outline: 3px solid var(--lens); outline-offset: 2px; }

/* ---------- Avisos ---------- */
.alert { border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 18px; font-weight: 550; background: var(--sky); }
.alert--success { background: var(--ok-bg); }
.alert--danger { background: var(--bad-bg); }
.alert--warning { background: var(--warn-bg); }

/* ---------- App (logueado) ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__nav { display: flex; gap: 4px; margin-left: 12px; }
.top__nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.top__nav a:hover { color: var(--ink); background: var(--sky); }
.top__nav a.is-active { color: var(--ink); background: var(--sky); box-shadow: inset 0 0 0 1.5px var(--ink); }
.top__user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top__user form { margin: 0; }
.chip-user { font-weight: 650; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip-user i { font-size: 1.4rem; color: var(--tie); }

.page { max-width: 980px; margin: 0 auto; padding: clamp(20px, 4vw, 36px) var(--gutter) 48px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page__head p { margin: 6px 0 0; color: var(--ink-soft); }

.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }

.card {
  background: var(--paper-2); border: var(--stroke); border-radius: var(--r-md);
  padding: clamp(16px, 3vw, 24px); box-shadow: 5px 5px 0 var(--ink); margin-bottom: 20px;
}
.card h2 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h2 i { color: var(--tie); }
.card--flat { box-shadow: none; border-width: 1.5px; border-color: var(--line); }

/* Saludo de Drop */
.hola { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 18px; }
.hola img { width: 96px; flex-shrink: 0; }
.hola .bubble { margin-bottom: 38px; font-size: 1.05rem; max-width: 26rem; }

/* Saldo */
.saldo { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.saldo__monto { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variation-settings: "opsz" 96; }
.saldo__label { font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; }
.saldo--debe .saldo__monto { color: var(--bad); }
.saldo--ok .saldo__monto { color: var(--ok); }
.saldo__info { margin-top: 8px; font-size: .95rem; color: var(--ink-soft); }
.saldo__sello { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; border: var(--stroke); background: var(--ok-bg); color: var(--ok); }
.saldo--debe .saldo__sello { background: var(--bad-bg); color: var(--bad); }

/* Cómo pagar */
.pagar dl { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; margin: 0 0 12px; }
.pagar dt { font-weight: 650; color: var(--ink-soft); font-size: .9rem; }
.pagar dd { margin: 0; font-weight: 700; word-break: break-all; }
.copiar { background: var(--sky); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 10px; font: 600 .82rem var(--f-sans); cursor: pointer; color: var(--ink); }
.copiar.is-ok { background: var(--ok-bg); }

/* Listas */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-top: 1.5px solid var(--line); }
.lista li:first-child { border-top: 0; }
.fila { display: flex; align-items: center; gap: 12px; padding: 12px 2px; text-decoration: none; color: inherit; }
a.fila:hover { background: var(--paper); }
.fila__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sky); color: var(--tie); font-size: 1.15rem; flex-shrink: 0; border: 1.5px solid var(--line); }
.fila__main { flex: 1; min-width: 0; }
.fila__main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila__main small { color: var(--ink-soft); }
.fila__side { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fila__side strong { font-size: 1.05rem; }
.fila__go { color: var(--ink-soft); }

/* Etiquetas de estado */
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1.5px solid currentColor; line-height: 1.2; white-space: nowrap; }
.tag--ok { color: var(--ok); background: var(--ok-bg); }
.tag--bad { color: var(--bad); background: var(--bad-bg); }
.tag--warn { color: var(--warn); background: var(--warn-bg); }
.tag--info { color: var(--tie); background: var(--sky); }
.tag--muted { color: var(--ink-soft); background: var(--paper); }

/* Conexiones */
.conexion__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.conexion__plan { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.vel { display: flex; gap: 10px; margin: 0 0 14px; }
.vel div { flex: 1; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.vel span { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.vel strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.vel small { font-weight: 600; color: var(--ink-soft); }
.wifi { background: var(--paper); border: 1.5px dashed var(--ink); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 10px; }
.wifi__fila { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; flex-wrap: wrap; }
.wifi__fila + .wifi__fila { border-top: 1px solid var(--line); }
.wifi__dato { min-width: 0; }
.wifi__dato span { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.wifi__dato code { font: 700 1.05rem/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; word-break: break-all; }
.wifi__acciones { display: flex; gap: 6px; }

.vacio { text-align: center; padding: 18px 8px; color: var(--ink-soft); }
.vacio img { width: 120px; margin: 0 auto 8px; }

/* Barra inferior (celular) */
.tabbar { display: none; }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  :root { --tabbar-h: 66px; }
  .top__nav { display: none; }
  .top__user .chip-user span { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--paper-2); border-top: var(--stroke);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-soft); font-size: .74rem; font-weight: 650; }
  .tabbar i { font-size: 1.35rem; line-height: 1; }
  .tabbar a.is-active { color: var(--tie); }
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { padding: 20px 20px 0; padding-top: max(20px, env(safe-area-inset-top)); }
  .auth__art { flex-direction: row; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 10px; }
  .auth__art img { width: 130px; max-height: none; }
  .auth__art .bubble { font-size: .92rem; margin-bottom: 64px; }
  .auth__art .bubble::after { left: auto; right: -6px; bottom: 14px; transform: rotate(-45deg) skew(8deg, 8deg); }
  .auth__main { padding-top: 28px; align-items: flex-start; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .opciones { grid-template-columns: 1fr; }
  .hola img { width: 78px; }
  .card { box-shadow: 4px 4px 0 var(--ink); }
  .pagar dl { grid-template-columns: 1fr auto; }
  .pagar dt { grid-column: 1 / -1; margin-bottom: -6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.txt-bad { color: var(--bad); }
.txt-ok { color: var(--ok); }
.text-capitalize::first-letter { text-transform: uppercase; }
.mt { margin-top: 12px; margin-bottom: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }

/* Ajustes: velocidades y títulos de las listas */
.vel { display: grid; grid-template-columns: 1fr 1fr 1.3fr; }
.vel div { min-width: 0; }
.vel span { white-space: nowrap; }
.vel strong { white-space: nowrap; }
.lista .fila__main strong { white-space: normal; overflow: visible; }
@media (max-width: 520px) {
  .vel { grid-template-columns: 1fr 1fr; }
  .vel div:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
}
