:root {

    --navy: #101b3c;

    --navy-light: #192850;

    --primary: #6657e8;

    --primary-soft: #eeecff;

    --green: #14a673;

    --green-soft: #e7f8f1;

    --red: #e04f5f;

    --red-soft: #fff0f2;

    --amber: #e99b22;

    --amber-soft: #fff5df;

    --ink: #20263a;

    --muted: #788198;

    --line: #e8eaf1;

    --surface: #ffffff;

    --background: #f5f6fa;

    --radius: 16px;

    --shadow: 0 12px 40px rgba(25, 35, 65, .08);

}



* { box-sizing: border-box; }

body { margin: 0; color: var(--ink); background: var(--background); font-family: "DM Sans", sans-serif; }

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

button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 28px 18px 20px; color: #fff; background: var(--navy); display: flex; flex-direction: column; z-index: 5; }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 34px; font-family: Manrope, sans-serif; }

.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #8477ff, #5846dc); font-size: 22px; font-weight: 800; box-shadow: 0 10px 25px rgba(102, 87, 232, .4); }

.brand strong { font-size: 19px; }

.brand small { margin-left: 5px; color: #9b91ff; font-size: 10px; letter-spacing: .12em; }

.nav { display: grid; gap: 7px; }

.nav a { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 11px; color: #aeb7d1; font-weight: 600; transition: .2s; }

.nav a span { width: 21px; text-align: center; font-size: 19px; }

.nav a:hover, .nav a.active { color: #fff; background: var(--navy-light); }

.nav a.active { box-shadow: inset 3px 0 #7668f4; }

.sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }

.advisor { display: flex; align-items: center; gap: 10px; }

.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #7668f4; font-weight: 700; }

.advisor div { display: grid; }

.advisor strong { font-size: 14px; }

.advisor small { color: #8f99b8; font-size: 12px; }

.logout { margin-top: 13px; padding: 0; border: 0; color: #9aa4c2; background: none; cursor: pointer; font-size: 12px; }

.main { grid-column: 2; min-width: 0; padding: 34px 38px 50px; }

.topbar { min-height: 74px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }

.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .14em; }

h1, h2, h3 { margin-top: 0; font-family: Manrope, sans-serif; }

h1 { margin-bottom: 0; font-size: 28px; letter-spacing: -.03em; }

h2 { margin-bottom: 18px; font-size: 18px; }

.top-actions { display: flex; gap: 10px; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 700; transition: .2s; }

.btn:hover { transform: translateY(-1px); }

.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgba(102, 87, 232, .22); }

.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-danger { color: #a32c3b; background: var(--red-soft); border-color: transparent; }
.btn-whatsapp { color: #08704b; background: var(--green-soft); border-color: transparent; }
.pay-form { display: flex; gap: 7px; align-items: center; min-width: 280px; }
.pay-form input { min-width: 0; }
.whatsapp-queue { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--green-soft); background: #f6fcf9; }
.whatsapp-queue .btn-whatsapp { color: #fff; background: #1fa463; }

.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }

.alert { margin-bottom: 20px; padding: 13px 16px; border-radius: 11px; font-weight: 600; }

.alert.success { color: #08704b; background: var(--green-soft); }

.alert.error { color: #a32c3b; background: var(--red-soft); }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }

.client-balances { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }

.stat { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 20px rgba(25, 35, 65, .035); }

.stat::after { content: ""; position: absolute; width: 70px; height: 70px; right: -22px; top: -25px; border-radius: 50%; background: var(--primary-soft); }

.stat.green::after { background: var(--green-soft); }

.stat.red::after { background: var(--red-soft); }

.stat.amber::after { background: var(--amber-soft); }

.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }

.stat-value { display: block; margin-top: 9px; font-family: Manrope, sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }

.stat-note { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.stat-split { display: block; margin-top: 8px; color: var(--ink); font-family: Manrope, sans-serif; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 20px; }

.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 20px rgba(25, 35, 65, .035); }

.card + .card { margin-top: 20px; }

.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.card-header h2 { margin: 0; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th { padding: 11px 12px; color: var(--muted); background: #fafbfc; text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }

td { padding: 13px 12px; border-bottom: 1px solid #f0f1f5; font-size: 14px; }

tr:last-child td { border-bottom: 0; }

.table-link { color: var(--ink); font-weight: 700; }

.table-link:hover { color: var(--primary); }

.money { font-variant-numeric: tabular-nums; font-weight: 700; }

.muted { color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }

.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.badge.active, .badge.pending { color: #9a6611; background: var(--amber-soft); }

.badge.paid { color: #08704b; background: var(--green-soft); }

.badge.overdue { color: #b82e40; background: var(--red-soft); }

.badge.partial { color: #4f43bf; background: var(--primary-soft); }

.empty { padding: 35px 12px; color: var(--muted); text-align: center; }

.list { display: grid; gap: 4px; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f0f1f5; }

.list-row:last-child { border-bottom: 0; }

.list-row strong, .list-row small { display: block; }

.list-row small { margin-top: 3px; color: var(--muted); }

.searchbar { display: flex; gap: 10px; margin-bottom: 18px; }

.searchbar input { max-width: 420px; }

.form-card { max-width: 850px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.field { display: grid; gap: 7px; }

.field.full { grid-column: 1 / -1; }

label { color: #4d556b; font-size: 13px; font-weight: 700; }

input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid #dfe2ea; border-radius: 10px; color: var(--ink); background: #fff; outline: none; transition: .2s; }

input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

textarea { min-height: 92px; resize: vertical; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.calculator { margin-top: 18px; padding: 18px; border-radius: 13px; background: linear-gradient(135deg, #f0eeff, #f7f6ff); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.calculator span { color: var(--muted); font-size: 11px; text-transform: uppercase; }

.calculator strong { display: block; margin-top: 4px; font-size: 18px; }

.profile { display: flex; align-items: center; gap: 16px; }

.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--primary), #877bff); font: 800 22px Manrope; }

.profile h2 { margin: 0 0 4px; }

.profile p { margin: 0; color: var(--muted); }

.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }

.details span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }

.details strong { display: block; margin-top: 5px; font-size: 14px; }

.progress { height: 7px; overflow: hidden; border-radius: 10px; background: #eceef3; }

.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8b7fff); }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--muted); font-size: 13px; }

.pagination-links { display: flex; gap: 7px; }

.pagination a, .pagination span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #fff; }

.login-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 55px; color: #fff; background: radial-gradient(circle at 80% 20%, #5545bd 0, transparent 35%), linear-gradient(145deg, #101b3c, #192850); }

.login-visual::after { content: "$"; position: absolute; right: -30px; bottom: -110px; color: rgba(255,255,255,.035); font: 800 430px Manrope; }

.login-visual h1 { max-width: 590px; font-size: clamp(38px, 5vw, 66px); line-height: 1.08; }

.login-visual p { max-width: 480px; color: #abb5d1; font-size: 17px; line-height: 1.7; }

.login-form { display: grid; place-items: center; padding: 35px; }

.login-box { width: min(420px, 100%); }

.login-box h2 { margin-bottom: 8px; font-size: 30px; }

.login-box > p { margin: 0 0 30px; color: var(--muted); }

.login-box .field { margin-bottom: 17px; }

.login-box .btn { width: 100%; margin-top: 8px; }

.check { display: flex; align-items: center; gap: 8px; }

.check input { width: auto; }



@media (max-width: 1050px) {

    .stats { grid-template-columns: repeat(2, 1fr); }

    .grid-2 { grid-template-columns: 1fr; }

}



@media (max-width: 760px) {

    .app-shell { display: block; }

    .sidebar { position: static; width: auto; min-height: auto; padding: 18px; }

    .brand { padding-bottom: 18px; }

    .nav { grid-template-columns: repeat(3, 1fr); }

    .nav a { justify-content: center; font-size: 12px; }

    .nav a span { display: none; }

    .sidebar-footer { display: none; }

    .main { padding: 24px 16px 40px; }

    .topbar { flex-direction: column; }

    .form-grid, .details { grid-template-columns: 1fr; }

    .calculator { grid-template-columns: 1fr; }

    .login-page { grid-template-columns: 1fr; }

    .login-visual { display: none; }

}



.analysis-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.upcoming-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-legend { display: flex; gap: 16px; color: var(--muted); font-size: 13px; font-weight: 700; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.swatch.capital { background: #6657e8; }
.swatch.interest { background: #14a673; }
.chart-scroll { position: relative; overflow-x: auto; }
.year-chart { width: 100%; min-width: 720px; height: auto; font-family: Manrope, sans-serif; }
.year-chart [data-tip] { cursor: pointer; }
.chart-tooltip { position: fixed; z-index: 20; padding: 8px 12px; border-radius: 10px; color: #fff; background: #101b3c; font-size: 13px; font-weight: 700; pointer-events: none; box-shadow: 0 10px 24px rgba(16, 27, 60, .2); }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 20px; margin-top: 20px; }
.analysis-mix h2, .analysis-grid h2 { margin-bottom: 16px; }
.mix-row { display: flex; align-items: center; gap: 22px; }
.mix-ring { width: 168px; height: 168px; flex: none; font-family: Manrope, sans-serif; }
.mix-lead { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.insight-list { display: grid; gap: 10px; }
.insight { display: grid; grid-template-columns: 52px 1.3fr 1.2fr 1fr; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.insight:last-child { border-bottom: 0; }
.insight-profit { color: #08704b; font-weight: 700; }

@media (max-width: 900px) {
    .analysis-stats, .analysis-grid, .mix-row { grid-template-columns: 1fr; display: grid; }
    .mix-row { display: grid; justify-items: center; }
    .insight { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {

    .stats { grid-template-columns: 1fr; }

    .top-actions { width: 100%; }

    .top-actions .btn { flex: 1; }

}

