/* ============================================================
   CO/IN Payment Wallet — estilos
   Estética: fintech refinado, grafito + oro cálido
   ============================================================ */

:root {
    --bg:        #0E0F13;
    --bg-2:      #14151A;
    --surface:   #1A1C22;
    --surface-2: #21242C;
    --line:      #2A2D36;
    --txt:       #ECEDF1;
    --txt-dim:   #9A9DA8;
    --txt-faint: #6A6D78;

    --gold:      #F5C451;
    --gold-deep: #C9982E;
    --mint:      #5FD3A8;
    --red:       #F0796B;

    --radius:    18px;
    --radius-sm: 12px;
    --shadow:    0 24px 60px -20px rgba(0,0,0,.65);

    --font-display: 'Bricolage Grotesque', serif;
    --font-body:    'Plus Jakarta Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-bg {
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(1100px 600px at 85% -10%, rgba(245,196,81,.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(95,211,168,.07), transparent 55%),
        var(--bg);
}

a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
    display: flex; align-items: center; gap: 1.5rem;
    padding: 1rem 1.5rem;
    max-width: 920px; margin: 0 auto;
    border-bottom: 1px solid var(--line);
}
.brand {
    font-family: var(--font-display);
    font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em;
    display: flex; align-items: center; gap: .4rem;
}
.brand-mark { color: var(--gold); font-size: 1.1em; }
.brand-slash { color: var(--gold); }
.topnav { display: flex; gap: 1.25rem; margin-left: auto; }
.topnav a {
    color: var(--txt-dim); font-weight: 500; font-size: .94rem;
    padding: .35rem 0; position: relative; transition: color .2s;
}
.topnav a:hover { color: var(--txt); }
.topnav a.active { color: var(--gold); }
.topnav a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--gold); border-radius: 2px;
}
.logout {
    color: var(--txt-faint); font-size: .88rem; font-weight: 500;
    padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px;
    transition: all .2s;
}
.logout:hover { color: var(--txt); border-color: var(--txt-faint); }

/* ---------- Layout ---------- */
.container {
    max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem 4rem;
    animation: rise .5s cubic-bezier(.2,.7,.3,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Balance card ---------- */
.balance-card {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #20232B 0%, #16181E 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.balance-card::before {
    content: ''; position: absolute; top: -60%; right: -10%;
    width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245,196,81,.18), transparent 70%);
}
.balance-label { color: var(--txt-dim); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.balance-amount {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(2.4rem, 8vw, 3.4rem); letter-spacing: -.03em;
    margin: .35rem 0 1.25rem; line-height: 1;
}
.balance-amount .cents { color: var(--txt-dim); font-size: .55em; }
.balance-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; position: relative; }
.meta-item .meta-k { color: var(--txt-faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.meta-item .meta-v { font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.copy-btn {
    background: none; border: none; color: var(--gold); cursor: pointer;
    font-size: .8rem; padding: 0; font-family: var(--font-body);
}
.copy-btn:hover { color: var(--gold-deep); }

/* ---------- Quick actions ---------- */
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.action-tile {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 1.25rem 1rem;
    text-align: center; transition: all .2s; cursor: pointer;
}
.action-tile:hover { border-color: var(--gold-deep); transform: translateY(-2px); background: var(--surface-2); }
.action-tile .ico { font-size: 1.6rem; display: block; margin-bottom: .5rem; }
.action-tile .lbl { font-weight: 600; font-size: .9rem; }

/* ---------- Cards / panels ---------- */
.panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem;
}
.panel h2, .panel h1 {
    font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
    margin-bottom: 1.25rem; font-size: 1.4rem;
}
.section-title { color: var(--txt-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }

/* ---------- Movements list ---------- */
.mov-list { list-style: none; }
.mov {
    display: flex; align-items: center; gap: 1rem;
    padding: .9rem 0; border-bottom: 1px solid var(--line);
}
.mov:last-child { border-bottom: none; }
.mov-ico {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 1.1rem;
}
.mov-ico.in  { background: rgba(95,211,168,.12); color: var(--mint); }
.mov-ico.out { background: rgba(240,121,107,.12); color: var(--red); }
.mov-ico.dep { background: rgba(245,196,81,.12); color: var(--gold); }
.mov-info { flex: 1; min-width: 0; }
.mov-title { font-weight: 600; font-size: .95rem; }
.mov-sub { color: var(--txt-faint); font-size: .8rem; }
.mov-amount { font-weight: 700; font-family: var(--font-display); white-space: nowrap; }
.mov-amount.in  { color: var(--mint); }
.mov-amount.out { color: var(--red); }
.empty { color: var(--txt-faint); text-align: center; padding: 2.5rem 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; color: var(--txt-dim); margin-bottom: .4rem; font-weight: 500; }
.field input, .field select, .field textarea {
    width: 100%; padding: .85rem 1rem;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--txt); font-family: var(--font-body); font-size: 1rem; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--gold-deep);
}
.field input::placeholder { color: var(--txt-faint); }

.amount-input { position: relative; }
.amount-input .currency {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--txt-dim); font-weight: 600; pointer-events: none;
}
.amount-input input { padding-left: 2.2rem; font-size: 1.5rem; font-family: var(--font-display); font-weight: 600; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%; padding: .95rem 1.5rem; border: none; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: all .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #1A1206; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--txt); }
.btn-ghost:hover { border-color: var(--txt-faint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.chip {
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
    padding: .4rem .85rem; font-size: .85rem; color: var(--txt-dim); cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--gold-deep); color: var(--txt); }

/* ---------- Flash ---------- */
.flash { padding: .9rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: .92rem; font-weight: 500; }
.flash-success { background: rgba(95,211,168,.12); color: var(--mint); border: 1px solid rgba(95,211,168,.3); }
.flash-error   { background: rgba(240,121,107,.12); color: var(--red);  border: 1px solid rgba(240,121,107,.3); }

/* ---------- Auth screens ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 410px; }
.auth-brand {
    font-family: var(--font-display); font-weight: 700; font-size: 2.2rem;
    text-align: center; letter-spacing: -.03em; margin-bottom: .4rem;
}
.auth-brand .brand-mark, .auth-brand .brand-slash { color: var(--gold); }
.auth-tag { text-align: center; color: var(--txt-dim); margin-bottom: 2rem; font-size: .95rem; }
.auth-switch { text-align: center; margin-top: 1.4rem; color: var(--txt-dim); font-size: .9rem; }
.auth-switch a { color: var(--gold); font-weight: 600; }

/* ---------- Receive / QR ---------- */
.qr-box { background: #fff; padding: 1rem; border-radius: var(--radius-sm); display: inline-block; }
.qr-box img, .qr-box svg { display: block; }
.receive-data { text-align: center; }
.receive-data .big-alias { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 1rem 0 .3rem; }

/* ---------- Footer ---------- */
.appfoot {
    max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    color: var(--txt-faint); font-size: .82rem; border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .topbar { gap: 1rem; padding: .9rem 1rem; flex-wrap: wrap; }
    .topnav { gap: .9rem; order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
    .actions-grid { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .action-tile { padding: 1rem .5rem; }
    .action-tile .lbl { font-size: .8rem; }
}
