/* public/assets/css/admin.css — panel administrativo (misma paleta pastel del sitio) */
:root {
    --ink: #2e3648;
    --ink-2: #586176;
    --muted: #8a91a2;
    --line: #efe6dc;
    --line-soft: #f6f0e9;
    --bg: #fffaf5;
    --white: #fff;
    --primary: #c9524a;
    --primary-hover: #b4463f;
    --peach: #ffe9e1;  --peach-2: #ffd9cc; --peach-ink: #b8513f;
    --mint: #e3f5ee;   --mint-2: #cdeee1;  --mint-ink: #2f7f66;
    --lav: #eeeafc;    --lav-2: #ddd6f8;   --lav-ink: #6352b3;
    --butter: #fff4d4; --butter-ink: #8f6400;
    --coral: var(--primary);
    --teal: #7fd0b2;
    --teal-600: var(--mint-ink);
    --teal-50: var(--mint);
    --ok: #2f7f66;
    --ok-50: #e3f5ee;
    --warn: #8f6400;
    --warn-50: #fff4d4;
    --danger: #b2433c;
    --danger-50: #fde8ef;
    --font-display: 'Fraunces', Georgia, serif;
    --font-sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --r-sm: 9px;
    --r-md: 12px;
    --r-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 29, 46, .05), 0 2px 6px rgba(15, 29, 46, .04);
    --shadow-md: 0 1px 2px rgba(15, 29, 46, .04), 0 12px 28px -10px rgba(15, 29, 46, .16);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-600); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.i { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -.18em; }
.muted { color: var(--muted); }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .92em; }

/* ================================================================ Estructura */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.4rem 1rem; background: var(--white); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; padding: 0 .5rem; text-decoration: none; color: var(--ink); }
.brand strong { display: block; font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-weight: 600; font-size: 1.12rem; line-height: 1.15; }
.brand small { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; }
.side-nav { display: grid; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 14px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .95rem; transition: background .15s, color .15s; }
.side-nav a .i { width: 18px; height: 18px; }
.side-nav a:hover { background: var(--bg); color: var(--ink); }
.side-nav a.active { background: var(--peach); color: var(--peach-ink); }
.side-user { margin-top: auto; display: flex; align-items: center; gap: .4rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.side-user form { margin: 0; }
.side-user-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .45rem; border-radius: 14px; text-decoration: none; color: var(--ink); }
.side-user-link:hover, .side-user-link.active { background: var(--bg); }
.side-user-link b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-link small { display: block; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-link > span:last-child { min-width: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--lav); color: var(--lav-ink); font-weight: 800; flex-shrink: 0; }

.content { padding: 2.2rem clamp(1rem, 3vw, 2.8rem) 4rem; max-width: 1360px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.page-head h1 { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-weight: 600; font-size: 1.95rem; letter-spacing: -.02em; line-height: 1.15; }
.page-head p { color: var(--muted); margin-top: .35rem; max-width: 640px; }
.head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.head-totals { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.head-totals div span { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.head-totals div b { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.back { display: inline-flex; align-items: center; gap: .3rem; font-size: .84rem; font-weight: 700; color: var(--muted); text-decoration: none; margin-bottom: .5rem; }
.back:hover { color: var(--ink); }

/* ================================================================ Tarjetas */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.card-flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 820px; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.card-header h2 { font-size: 1.02rem; font-weight: 800; }
.link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .86rem; text-decoration: none; }
.sub { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2rem 0 .7rem; }
.sub:first-of-type { margin-top: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }

.balance-grid { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 1.2rem; margin-bottom: 1.5rem; }
.balance-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.balance-card header { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.balance-card h2 { font-size: .95rem; font-weight: 800; }
.cur-chip { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 .45rem; border-radius: 8px; background: var(--lav); color: var(--lav-ink); font-weight: 800; font-size: .76rem; }
.balance-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.balance-rows span { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.balance-rows b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: .15rem 0; white-space: nowrap; }
.balance-rows b.neg { color: var(--danger); }
.balance-rows small { color: var(--muted); font-size: .76rem; }
.bar { height: 7px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--mint-2), #7fd0b2); border-radius: 99px; }
.bar-thin { height: 5px; }
.bar-label { display: block; margin-top: .5rem; color: var(--muted); font-size: .78rem; font-weight: 600; }
.pending-card { display: flex; flex-direction: column; justify-content: center; gap: .1rem; padding: 1.4rem; border-radius: var(--r-lg); background: var(--peach); color: var(--ink); text-decoration: none; position: relative; overflow: hidden; }
.pending-card::after { content: ''; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.pending-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--white); color: var(--peach-ink); margin-bottom: .8rem; }
.pending-card b { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1; }
.pending-card > span:not(.pending-icon) { color: var(--ink-2); font-weight: 600; }
.pending-card small { display: inline-flex; align-items: center; gap: .3rem; margin-top: .9rem; font-weight: 700; color: var(--peach-ink); }
.cat-row { margin-bottom: .75rem; }
.cat-label { display: flex; justify-content: space-between; gap: .6rem; font-size: .86rem; font-weight: 600; margin-bottom: .3rem; }
.cat-label b { font-variant-numeric: tabular-nums; }

/* ================================================================ Tablas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: .8rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
th.r { text-align: right; }
.card:not(.card-flush) th { background: transparent; padding-inline: .5rem; }
td { padding: .95rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.card:not(.card-flush) td { padding-inline: .5rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffcf9; }
tr.inactive td { opacity: .55; }
td small { display: block; color: var(--muted); font-size: .8rem; margin-top: .15rem; }
td small.quote { font-style: italic; max-width: 300px; }
td.num, .amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.amount { font-size: .98rem; }
.with-icon { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.with-icon .i { color: var(--teal-600); }
.link-sm { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; font-size: .8rem; font-weight: 700; text-decoration: none; }
.details small span { font-weight: 700; color: var(--ink-2); margin-right: .2rem; }
.method-cell { display: flex; align-items: center; gap: .75rem; }
.method-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mint); color: var(--mint-ink); flex-shrink: 0; }
.row-actions { display: inline-flex; gap: .4rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.actions-cell { min-width: 220px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; color: var(--muted); padding: 2.6rem 1rem; font-weight: 600; }
.empty .i { width: 28px; height: 28px; color: #b9b1a5; }

/* Rechazo */
.reject { position: relative; }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 280px; display: grid; gap: .6rem; padding: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); text-align: left; }
.reject-pop label span { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-2); margin-bottom: .3rem; }
.reject-pop input { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); }

/* Pestañas */
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--muted); padding: .5rem 1rem; border-radius: 999px; }
.tabs a span { font-size: .72rem; background: var(--line-soft); color: var(--ink-2); padding: .05rem .45rem; border-radius: 99px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--lav); color: var(--lav-ink); }
.tabs a.active span { background: var(--white); color: var(--lav-ink); }

/* Insignias */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 800; padding: .25rem .6rem; border-radius: 99px; white-space: nowrap; }
.b-aprobado { background: var(--ok-50); color: var(--ok); }
.b-pendiente { background: var(--warn-50); color: var(--warn); }
.b-rechazado { background: var(--danger-50); color: var(--danger); }
.b-muted { background: var(--line-soft); color: var(--muted); }

/* ================================================================ Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 700; font-size: .9rem; line-height: 1; padding: .75rem 1.15rem; border-radius: var(--r-md); border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-sm { padding: .5rem .8rem; font-size: .82rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -10px rgba(201, 82, 74, .8); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: #c9c2b7; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { background: #0e6b4c; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; text-decoration: none; transition: all .15s; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-50); }

/* ================================================================ Formularios */
.form-section { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 1.8rem 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line-soft); }
form > .form-section:first-of-type, .card > .form-section:first-child { margin-top: 0; }
.field { display: block; margin-bottom: 1.05rem; }
.field > span:first-child { display: block; font-weight: 700; font-size: .84rem; color: var(--ink-2); margin-bottom: .4rem; }
.field em { font-weight: 500; font-style: normal; color: var(--muted); font-size: .78rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--white); padding: .72rem .85rem; border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23697686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.4rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mint-2); box-shadow: 0 0 0 4px var(--mint); }
.field textarea { resize: vertical; }
.hint { display: block; color: var(--muted); font-size: .78rem; margin-top: .35rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
[data-campo][hidden] { display: none; }
.affix { display: flex; }
.affix b { display: grid; place-items: center; min-width: 50px; padding: 0 .6rem; background: var(--bg); border: 1px solid var(--line); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); font-size: .88rem; color: var(--ink-2); }
.field .affix input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.note { display: flex; gap: .55rem; align-items: flex-start; font-size: .84rem; color: var(--ink-2); background: var(--bg); border-radius: var(--r-md); padding: .75rem .9rem; margin-top: .4rem; }
.note .i { margin-top: .12rem; }
.note-warn { background: var(--warn-50); color: #7a4a08; }
.switch { display: flex; align-items: center; gap: .7rem; padding-top: 1.7rem; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line); transition: background .2s; flex-shrink: 0; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--teal); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--coral); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.8rem 1rem; text-align: center; border: 1.5px dashed var(--peach-2); border-radius: var(--r-lg); background: #fffaf8; cursor: pointer; transition: all .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--teal); background: var(--teal-50); }
.dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.dz-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); color: var(--teal-600); margin-bottom: .3rem; }
.dropzone strong { font-size: .92rem; }
.dropzone small { color: var(--muted); font-size: .8rem; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; margin-top: .8rem; }
.preview { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-md); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .pdf-ic { text-align: center; color: var(--ink-2); font-weight: 800; font-size: .8rem; }
.preview .pdf-ic small { display: block; font-weight: 500; color: var(--muted); font-size: .7rem; padding: 0 .3rem; word-break: break-all; }
.preview.err { border-color: var(--danger); }
.preview .err-msg { position: absolute; inset: auto 0 0; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; padding: .25rem; text-align: center; }
.preview button, .attach-del { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10, 22, 38, .75); color: #fff; cursor: pointer; }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .7rem; }
.attach { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg); }
.attach img, .attach .pdf { display: grid; place-items: center; width: 100%; aspect-ratio: 1; object-fit: cover; text-decoration: none; color: var(--ink-2); }
.attach .pdf { align-content: center; gap: .2rem; font-weight: 800; font-size: .8rem; }
.attach .pdf .i { width: 26px; height: 26px; }
.attach figcaption { font-size: .72rem; color: var(--muted); padding: .35rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--white); }
.attach form { margin: 0; }

/* Alertas */
.alert { display: flex; align-items: flex-start; gap: .55rem; border-radius: var(--r-md); padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 600; font-size: .9rem; }
.alert .i { margin-top: .1rem; }
.alert-error { background: var(--danger-50); color: #a2302b; border: 1px solid #f4d3d0; }
.alert-exito { background: var(--ok-50); color: var(--ok); border: 1px solid #bfe6d4; }

/* ================================================================ Login */
.login-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--white); }
.login-aside { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 3.5rem; background: linear-gradient(150deg, var(--peach), var(--butter) 50%, var(--mint)); color: var(--ink); }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .6; }
.glow-a { width: 420px; height: 420px; top: -120px; right: -100px; background: radial-gradient(circle, rgba(255, 255, 255, .7), transparent 70%); }
.glow-b { width: 460px; height: 460px; bottom: -200px; left: -140px; background: radial-gradient(circle, rgba(238, 234, 252, .9), transparent 70%); }
.login-quote { position: relative; max-width: 460px; }
.login-quote p { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; margin: 1.6rem 0 1rem; }
.login-quote small { color: var(--ink-2); font-weight: 600; }
.login-main { display: grid; place-items: center; padding: 2rem 16px; }
.login-card { width: min(380px, 100%); }
.login-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; letter-spacing: -.02em; }
.login-card .muted { margin: .4rem 0 1.8rem; }
.login-card .btn { margin-top: .4rem; padding: .9rem; }
.login-card .back { margin-top: 1.4rem; }

/* ================================================================ Responsive */
/* ================================================================ Barra lateral: grupos */
.side-label { display: block; margin: 1rem .85rem .35rem; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ================================================================ Dashboard */
.welcome { position: relative; overflow: hidden; display: flex; align-items: center; gap: 2rem; padding: 2rem 2.2rem; margin-bottom: 1.5rem; border-radius: 26px; background: linear-gradient(120deg, var(--peach) 0%, #fdeef0 45%, var(--lav) 100%); }
.welcome::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -60px; bottom: -120px; background: rgba(255, 255, 255, .45); }
.welcome-text { position: relative; z-index: 1; flex: 1; }
.welcome-date { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--ink-2); font-size: .85rem; }
.welcome h1 { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-weight: 600; font-size: 2.1rem; margin: .35rem 0 .3rem; }
.welcome p { color: var(--ink-2); font-size: 1rem; }
.welcome-art { position: relative; z-index: 1; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; background: rgba(255, 255, 255, .7); flex-shrink: 0; }
.welcome-art img { width: 70px; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 1.4rem; }
.quick-btn { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border-radius: 16px; background: rgba(255, 255, 255, .85); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; min-width: 0; }
.quick-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-btn b { display: block; font-size: .9rem; line-height: 1.2; }
.quick-btn small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.q-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; font-size: 1.05rem; }
.q-peach .q-icon { background: var(--peach); color: var(--peach-ink); }
.q-mint .q-icon { background: var(--mint); color: var(--mint-ink); }
.q-lav .q-icon { background: var(--lav); color: var(--lav-ink); }
.q-butter .q-icon { background: var(--butter); color: var(--butter-ink); }

.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.5rem; }
.money { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.money header { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.money h2 { font-size: 1rem; font-weight: 800; }
.money header small { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .8rem; }
.money-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.money-rows > div { border-radius: 16px; padding: .85rem .95rem; min-width: 0; }
.money-rows span { display: flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.money-rows b { display: block; margin-top: .3rem; font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.money-rows b.neg { color: var(--danger); }
.m-in { background: var(--peach); } .m-in .i { color: var(--peach-ink); }
.m-out { background: var(--lav); } .m-out .i { color: var(--lav-ink); }
.m-left { background: var(--mint); } .m-left .i { color: var(--mint-ink); }
.money-progress { margin-top: 1rem; }
.money-progress small { display: block; margin-top: .45rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.money-progress small b { color: var(--ink); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dash-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }
.dash-col > .card { margin: 0; }
.card { border-radius: 22px; }
.card-sub { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: var(--line-soft); border-radius: 999px; }
.segmented button { font: inherit; font-weight: 800; font-size: .8rem; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: .4rem .85rem; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Gráfico mensual (colores validados: coral #d9675a / lavanda #7a6bd1) */
.legend { display: flex; gap: 1.2rem; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: .6rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-in { background: #d9675a; }
.sw-out { background: #7a6bd1; }
.chart { position: relative; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .ytick, .chart .xtick { fill: var(--muted); font: 600 11px var(--font-sans); }
.chart .xtick { fill: var(--ink-2); font-size: 12px; }
.chart .band { fill: transparent; cursor: default; }
.chart .band.on { fill: rgba(122, 107, 209, .06); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: .9rem; text-align: center; padding: 0 1rem; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; box-shadow: var(--shadow-md); font-size: .82rem; transform: translate(-50%, calc(-100% - 10px)); }
.chart-tip b { display: block; margin-bottom: .3rem; font-size: .85rem; }
.chart-tip div { display: flex; align-items: center; gap: .45rem; justify-content: space-between; }
.chart-tip div span { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); }
.chart-tip div strong { font-variant-numeric: tabular-nums; }
.chart-table { margin-top: .9rem; }
.chart-table summary { cursor: pointer; font-weight: 700; font-size: .84rem; color: var(--mint-ink); width: fit-content; }
.chart-table table { margin-top: .6rem; }
.chart-table td, .chart-table th { padding: .5rem .4rem; }

.pending-list, .feed, .tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.pending-list li, .feed li { display: flex; align-items: center; gap: .8rem; padding: .65rem .3rem; border-radius: 14px; }
.pending-list li + li, .feed li + li { border-top: 1px solid var(--line-soft); }
.pending-list div, .feed div { flex: 1; min-width: 0; }
.pending-list b, .feed b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-list small, .feed small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; }
.fi-peach { background: var(--peach); color: var(--peach-ink); }
.fi-lav { background: var(--lav); color: var(--lav-ink); }
.feed .amount, .pending-list .amount { font-size: .88rem; white-space: nowrap; }
.tasks li { display: flex; align-items: center; gap: .8rem; padding: .75rem .8rem; border-radius: 16px; }
.tasks li > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; background: rgba(255, 255, 255, .8); }
.tasks div { flex: 1; min-width: 0; }
.tasks b { display: block; font-size: .9rem; }
.tasks small { display: block; color: var(--ink-2); font-size: .79rem; }
.tasks a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.t-ok { background: var(--mint); } .t-ok > span { color: var(--mint-ink); }
.t-warn { background: var(--butter); } .t-warn > span { color: var(--butter-ink); }
.t-alert { background: var(--peach); } .t-alert > span { color: var(--peach-ink); }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); }
.empty-icon .i { width: 22px; height: 22px; color: inherit; }

/* ================================================================ Mi cuenta */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.account-grid .card { margin: 0; }
.account-hero { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; margin-bottom: 1.4rem; border-radius: 18px; background: linear-gradient(120deg, var(--peach), var(--lav)); }
.account-hero b { display: block; font-size: 1.05rem; }
.account-hero small { display: block; color: var(--ink-2); font-size: .84rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 18px; font-size: 1.4rem; background: var(--white); }
.form-section .i { margin-right: .3rem; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 3rem; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.pass-toggle:hover { background: var(--line-soft); color: var(--ink); }
.pass-toggle .off { display: none; }
.pass-toggle.showing .off { display: block; }
.pass-toggle.showing .i:not(.off) { display: none; }
.strength { margin: -.4rem 0 1rem; }
.strength-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.strength-bar span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }
.strength small { display: block; margin-top: .35rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.pass-tips { list-style: none; margin: .4rem 0 0; padding: .8rem 1rem; display: grid; gap: .3rem; background: var(--bg); border-radius: 14px; font-size: .84rem; color: var(--ink-2); }
.pass-tips li { display: flex; align-items: center; gap: .45rem; }
.pass-tips .i { color: var(--mint-ink); }
#match-text { margin: -.5rem 0 1rem; font-weight: 700; }

@media (max-width: 1280px) {
    .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .money-grid, .dash-grid, .account-grid { grid-template-columns: 1fr; }
    .welcome-art { display: none; }
}
@media (max-width: 680px) {
    .welcome { padding: 1.4rem; }
    .welcome h1 { font-size: 1.6rem; }
    .quick { grid-template-columns: 1fr; }
    .money-rows { grid-template-columns: 1fr; }
    .money header small { display: none; }
}

@media (max-width: 1180px) {
    .balance-grid { grid-template-columns: 1fr 1fr; }
    .pending-card { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 1rem; }
    .pending-card .pending-icon { margin: 0; }
    .pending-card small { margin: 0 0 0 auto; }
}
@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: .8rem; padding: .7rem 16px; overflow-x: auto; }
    .brand small, .brand strong { display: none; }
    .side-nav { display: flex; gap: 2px; }
    .side-nav a { padding: .55rem .7rem; white-space: nowrap; }
    .side-nav a.active { box-shadow: inset 0 -2px 0 var(--coral); }
    .side-user { margin: 0 0 0 auto; padding: 0; border: 0; }
    .side-user-link > span:last-child { display: none; }
    .grid-main { grid-template-columns: 1fr; }
    .login-page { grid-template-columns: 1fr; }
    .login-aside { display: none; }
}
@media (max-width: 680px) {
    .side-nav a span { display: none; }
    .content { padding: 1.4rem 16px 3rem; }
    .page-head h1 { font-size: 1.6rem; }
    .balance-grid { grid-template-columns: 1fr; }
    .balance-rows { grid-template-columns: 1fr; gap: .7rem; }
    .row-2 { grid-template-columns: 1fr; }
    .switch { padding-top: 0; }
    .card { padding: 1.15rem; }
    .card-flush { padding: 0; }
    .reject-pop { width: 240px; }
}
@media (max-width: 980px) { .side-label { display: none; } }
