/* CrediTrack — portal del cliente. Pensado primero para el celular. */
:root {
    --ink: #0b1f2a; --ink-2: #33495a; --muted: #5b6b78; --line: #dfe8ec;
    --bg: #f4f7f8; --card: #ffffff; --brand: #0f766e; --brand-2: #115e59; --brand-soft: #e6f4f1;
    --ok: #0f766e; --warn: #b45309; --warn-soft: #fef3c7; --bad: #c2410c; --bad-soft: #ffedd5;
    --r: 14px; --f: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }
.top { background: var(--ink); color: #fff; padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; color: #fff; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.top button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 28px 0 6px; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: 0 0 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.auth { max-width: 420px; margin: 8vh auto 0; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
input { width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.code { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin-top: 14px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: 600 1rem var(--f); cursor: pointer; text-decoration: none; text-align: center; line-height: 1.25; }
.btn:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.error { color: var(--bad); font-size: .92rem; margin: 8px 0 0; }
.note { color: var(--muted); font-size: .9rem; margin: 14px 0 0; text-align: center; }
.loan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.loan-head small { color: var(--muted); display: block; }
.balance { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 0; }
.pill { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill-activo { background: var(--brand-soft); color: var(--brand-2); }
.pill-atrasado { background: var(--bad-soft); color: var(--bad); }
.pill-pagado { background: #e8f5e9; color: #2e7d32; }
.pill-cancelado { background: #eceff1; color: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 16px 0 6px; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-label { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.next { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--brand-soft); }
.next.late { background: var(--bad-soft); }
.next strong { font-size: 1.15rem; }
.rows { list-style: none; padding: 0; margin: 14px 0 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.rows li small { color: var(--muted); }
.rows .amt { text-align: right; font-weight: 600; }
.rows li > span:first-child { white-space: nowrap; }
.rows small.st-pagado { color: var(--ok); } .rows small.st-vencido { color: var(--bad); } .rows small.st-pendiente { color: var(--muted); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; padding: 6px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ' ›'; }
details[open] summary::after { content: ' ⌄'; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.actions .btn { margin: 0; font-size: .95rem; padding: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 26px 0 40px; }
.hero { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 80% -10%, #134e4a 0%, var(--ink) 60%); color: #fff; text-align: center; padding: 24px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 18px 0 10px; color: #fff; }
.hero p { color: #b6c8cf; max-width: 30rem; margin: 0 auto 28px; }
.hero .choices { display: grid; gap: 12px; max-width: 360px; margin: 0 auto; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
