:root {
    --bg: #070f1f; --panel: rgba(18, 35, 66, .72); --panel-solid: #122342; --panel2: #1a3563; --line: rgba(120, 165, 255, .16);
    --text: #eaf0ff; --muted: #8ea6d0; --accent: #3b82f6; --accent2: #6366f1;
    --in: #34d399; --out: #f87171; --warn: #fbbf24;
    --empresa: #38bdf8; --pessoal: #a78bfa;
    --r: 18px; --side: 252px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; color: var(--text); min-height: 100vh;
    font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(1100px 600px at 85% -10%, rgba(59, 130, 246, .20), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(99, 102, 241, .16), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}
a { color: #86b8ff; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; }
h2 { font-size: 22px; margin-bottom: 14px; }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-bottom: 14px; }
h4 { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pos { color: var(--in); } .neg { color: var(--out); }

/* ===== estrutura de tela cheia ===== */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 20px 14px;
    background: linear-gradient(180deg, rgba(10, 24, 48, .95), rgba(7, 15, 31, .95)); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; font-size: 18px; padding: 4px 8px 18px; }
.logo { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 6px 18px rgba(59, 130, 246, .45); }
.menu { display: grid; gap: 4px; }
.menu a, .logout { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: .15s; }
.menu a svg, .logout svg { width: 21px; height: 21px; flex: none; }
.menu a:hover, .logout:hover { background: rgba(59, 130, 246, .10); color: var(--text); }
.menu a.on { background: linear-gradient(90deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, .06)); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidefoot { margin-top: auto; display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-weight: 600; overflow: hidden; white-space: nowrap; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); font-weight: 800; }
.logout:hover { color: var(--out); }

.content { min-width: 0; display: flex; flex-direction: column; }
.top {
    position: sticky; top: 0; z-index: 15; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 32px; background: rgba(7, 15, 31, .72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 26px; letter-spacing: -.01em; }
.wrap { width: 100%; padding: 28px 32px 90px; flex: 1; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* tablet: menu só com ícones */
@media (max-width: 1100px) {
    :root { --side: 78px; }
    .lbl { display: none; }
    .side { padding: 20px 10px; align-items: center; }
    .brand { padding: 4px 0 18px; }
    .menu a, .logout, .me { justify-content: center; padding: 12px; }
    .me { background: none; padding: 0; }
    .wrap { padding: 24px 22px 90px; } .top { padding: 16px 22px; }
}
/* celular: barra inferior */
.tabbar, .fab { display: none; }
@media (max-width: 760px) {
    .app { display: block; }
    .side { display: none; }
    .top { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
    .top h1 { font-size: 21px; }
    .topact { display: none; }
    .wrap { padding: 16px 14px calc(100px + env(safe-area-inset-bottom)); }
    .tabbar {
        display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
        background: rgba(8, 18, 36, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    }
    .tabbar a { padding: 15px 4px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; }
    .tabbar a.on { color: #fff; box-shadow: inset 0 3px 0 var(--accent); }
    .fab {
        display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30;
        width: 58px; height: 58px; border-radius: 50%; border: 0; color: #fff; font-size: 32px; line-height: 1; cursor: pointer;
        background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 28px rgba(59, 130, 246, .55);
    }
}

/* ===== cartões (vidro) ===== */
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px;
    backdrop-filter: blur(10px); box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
}
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid > .card { margin: 0; }
.g-hero { grid-template-columns: 1.6fr 1fr; }
.g-kpi { grid-template-columns: repeat(4, 1fr); }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-21 { grid-template-columns: 2fr 1fr; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.cards .card { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 18px; }
@media (max-width: 1100px) { .g-kpi { grid-template-columns: repeat(2, 1fr); } .g-hero, .g-21 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .g-kpi, .g-2, .cards, .grid2 { grid-template-columns: 1fr; } .grid, .cards { gap: 12px; }
    .g-kpi { grid-template-columns: 1fr 1fr; }
}

.hero-card {
    position: relative; overflow: hidden; border: 0; padding: 28px;
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 60%, #1e3a8a 100%); box-shadow: 0 20px 50px rgba(37, 99, 235, .35);
}
.hero-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.hero-card::before { content: ""; position: absolute; right: 60px; bottom: -120px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card small { color: rgba(255, 255, 255, .75); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.hero-card .big-num { display: block; font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 18px; }
.hero-card .pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: rgba(255, 255, 255, .14); padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: 14px; }
.pill small { display: inline; margin-right: 6px; text-transform: none; letter-spacing: 0; }

.stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; font-size: 26px; margin: 4px 0 6px; letter-spacing: -.01em; }
.stat.in strong { color: var(--in); } .stat.out strong { color: var(--out); }
.delta { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; display: inline-block; }
.delta.up { background: rgba(52, 211, 153, .15); color: var(--in); }
.delta.down { background: rgba(248, 113, 113, .15); color: var(--out); }
.delta.flat { background: rgba(255, 255, 255, .08); color: var(--muted); }
.kpi { border-top: 3px solid var(--line); }
.kpi.empresa { border-top-color: var(--empresa); } .kpi.pessoal { border-top-color: var(--pessoal); }
.kpi.in { border-top-color: var(--in); } .kpi.out { border-top-color: var(--out); }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chartbox { position: relative; height: 300px; }
.chartbox.sm { height: 240px; }
.empty { padding: 70px 0; text-align: center; }

/* ranking de categorias */
.rank { display: grid; gap: 14px; }
.rank .row b { font-variant-numeric: tabular-nums; }
.rank .bar i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* barra de ferramentas */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 22px; }
.monthnav a:hover { background: var(--panel2); }
.monthnav strong { min-width: 170px; text-align: center; font-size: 17px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 4px; }
.seg a { padding: 8px 18px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.seg a.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }

/* alertas */
.flash { padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; border: 1px solid; font-weight: 500; animation: rise .4s ease both; }
.flash.ok { background: rgba(16, 122, 88, .25); border-color: #1c6b52; color: #b7f5dd; }
.flash.erro { background: rgba(179, 48, 58, .28); border-color: #8b2c35; color: #ffc9ce; }
.flash.aviso { background: rgba(180, 130, 20, .26); border-color: #8a6b13; color: #ffe6a3; }

/* limites / barras */
.limit { margin-bottom: 16px; }
.bar { height: 10px; background: rgba(0, 0, 0, .35); border-radius: 6px; overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--in); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.limit.alerta .bar i { background: var(--warn); box-shadow: 0 0 12px rgba(251, 191, 36, .6); }
.limit.estourou .bar i { background: var(--out); box-shadow: 0 0 14px rgba(248, 113, 113, .7); }
.limit.estourou b { color: var(--out); } .limit.alerta b { color: var(--warn); }
.insights { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.insights li { padding: 12px 14px; background: rgba(255, 255, 255, .04); border-radius: 12px; border-left: 3px solid var(--accent); }

/* listas */
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); transition: background .15s; }
.item:hover { background: rgba(255, 255, 255, .03); }
.item:last-child { border-bottom: 0; }
.item small { display: block; color: var(--muted); margin-top: 2px; }
.item .right { text-align: right; }
.actions { display: flex; gap: 14px; justify-content: flex-end; margin-top: 4px; font-size: 13px; }
.actions form, form.inline { display: inline; margin: 0; }
.tag { padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.tag.empresa { background: rgba(56, 189, 248, .15); color: var(--empresa); }
.tag.pessoal { background: rgba(167, 139, 250, .15); color: var(--pessoal); }

/* formulários */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
input, select, textarea {
    width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: rgba(4, 10, 22, .65); color: var(--text); font: inherit; font-size: 16px;
}
input.big { font-size: 26px; font-weight: 700; padding: 14px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
select option { background: #0c1a33; }
input[type=radio] { display: none; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { display: block; }
.choice span { display: block; padding: 13px; text-align: center; border-radius: 12px; border: 1px solid var(--line); background: rgba(4, 10, 22, .65); color: var(--muted); cursor: pointer; font-weight: 700; transition: .15s; }
.choice input:checked + span { color: #fff; border-color: transparent; transform: translateY(-1px); }
.choice input:checked + span.in { background: #0f8a62; box-shadow: 0 6px 18px rgba(16, 185, 129, .35); }
.choice input:checked + span.out { background: #c23541; box-shadow: 0 6px 18px rgba(239, 68, 68, .35); }
.choice input:checked + span.empresa { background: #0b84b8; box-shadow: 0 6px 18px rgba(14, 165, 233, .35); }
.choice input:checked + span.pessoal { background: #6d4fe0; box-shadow: 0 6px 18px rgba(139, 92, 246, .35); }
.filters { display: grid; grid-template-columns: repeat(5, auto); gap: 10px; }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr 1fr; } .filters input[type=search] { grid-column: 1 / -1; } }
.btn {
    display: inline-block; padding: 13px 20px; border: 0; border-radius: 12px; color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 22px rgba(59, 130, 246, .35); transition: .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.small { padding: 9px 15px; font-size: 14px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; }
.actions-row { display: grid; gap: 10px; }
.link { background: none; border: 0; padding: 0; color: #86b8ff; font: inherit; cursor: pointer; }
.link.danger { color: var(--out); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); padding: 6px 6px 6px 14px; border-radius: 99px; margin: 0; }
.chip button { background: rgba(0, 0, 0, .35); border: 0; color: var(--muted); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }
.chip button:hover { color: var(--out); }
.content .form.card { max-width: 640px; }

/* ===== gaveta de lançamento rápido ===== */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(2, 6, 15, .62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(440px, 100%); padding: 24px; overflow-y: auto;
    background: #0b1a33; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
    transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { transform: none; }
.drawer .row { margin-bottom: 18px; } .drawer h3 { margin: 0; color: var(--text); font-size: 18px; }
.x { background: rgba(255, 255, 255, .08); border: 0; color: var(--text); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; }

/* ===== login em tela dividida ===== */
.authwrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.hero {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
    background: linear-gradient(145deg, #12326b 0%, #1e1b6b 55%, #0a1a3f 100%);
}
.hero .brand { padding: 0; font-size: 22px; position: relative; z-index: 1; }
.herotext { position: relative; z-index: 1; max-width: 520px; }
.herotext h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 18px; }
.herotext p { color: rgba(255, 255, 255, .78); font-size: 18px; }
.herotext ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.herotext li::before { content: "✓"; margin-right: 10px; color: var(--in); font-weight: 800; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.o1 { width: 420px; height: 420px; right: -140px; top: -120px; background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, .5), transparent 70%); animation: float 9s ease-in-out infinite; }
.o2 { width: 340px; height: 340px; left: -100px; bottom: -120px; background: radial-gradient(circle at 60% 40%, rgba(129, 140, 248, .45), transparent 70%); animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(26px) scale(1.06); } }
.authside { display: grid; place-items: center; padding: 32px; }
.auth { width: 100%; max-width: 400px; text-align: center; animation: rise .6s ease both; }
.auth .logo.big { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; margin: 0 auto 14px; }
.auth h1 { margin: 0 0 4px; font-size: 28px; }
.auth .form { text-align: left; margin-top: 20px; }
.auth .flash { text-align: left; }
@media (max-width: 900px) { .authwrap { grid-template-columns: 1fr; } .hero { display: none; } }

.ios-hint { position: fixed; left: 12px; right: 12px; bottom: 90px; z-index: 70; background: var(--panel2); border: 1px solid var(--line); padding: 14px; border-radius: 14px; }
.ios-hint button { margin-left: 8px; }

/* ===== página de limites ===== */
.small { font-size: 13px; margin: 0; }
.lim-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.lim-intro h2 { margin-bottom: 6px; font-size: 24px; }
.lim-intro p { margin: 0; max-width: 640px; }
.lim-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.sum { padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .06); }
.sum b { font-size: 16px; margin-right: 4px; }
.sum.ok b { color: var(--in); } .sum.alerta b { color: var(--warn); } .sum.estourou b { color: var(--out); }
.lim-layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.lim-form { position: sticky; top: 104px; margin: 0; }
.lim-form h3 { color: var(--text); font-size: 17px; margin: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.presets button { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--text); padding: 6px 13px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.presets button::before { content: "R$ "; color: var(--muted); font-weight: 500; }
.presets button:hover { background: var(--accent); border-color: transparent; }
.lim-list h4 { margin: 4px 0 12px; }
.lim-list h4:not(:first-child) { margin-top: 24px; }
.lim-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.lim-card { display: flex; gap: 18px; align-items: center; margin: 0; padding: 18px; transition: transform .15s, border-color .15s; }
.lim-card:hover { transform: translateY(-2px); border-color: rgba(120, 165, 255, .35); }
.lim-card.alerta { border-color: rgba(251, 191, 36, .45); }
.lim-card.estourou { border-color: rgba(248, 113, 113, .55); box-shadow: 0 0 0 1px rgba(248, 113, 113, .15), 0 10px 34px rgba(248, 113, 113, .12); }
.ring {
    --c: var(--in); flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; position: relative;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0);
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0f2040; }
.ring span { position: relative; font-weight: 800; font-size: 19px; }
.lim-card.alerta .ring { --c: var(--warn); } .lim-card.estourou .ring { --c: var(--out); }
.ring.ghost { --p: 0; margin: 0 auto 10px; }
.lim-info { display: grid; gap: 2px; min-width: 0; }
.lim-name { font-size: 17px; }
.lim-msg { color: var(--muted); }
.lim-msg b { color: var(--text); }
.lim-msg.neg b { color: var(--out); }
.lim-actions { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }
.lim-actions form { display: inline; margin: 0; }
.lim-empty { text-align: center; padding: 48px 28px; }
.lim-empty h3 { color: var(--text); font-size: 18px; }
.lim-empty p { max-width: 420px; margin: 8px auto 0; }
@media (max-width: 1100px) { .lim-layout { grid-template-columns: 1fr; } .lim-form { position: static; } .content .form.card.lim-form { max-width: none; } }
@media (max-width: 760px) { .lim-cards { grid-template-columns: 1fr; } .lim-intro h2 { font-size: 20px; } }
/* ===== página de categorias ===== */
.cat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cat-card { margin: 0; border-top: 3px solid var(--line); }
.cat-card.empresa { border-top-color: var(--empresa); } .cat-card.pessoal { border-top-color: var(--pessoal); }
.cat-card h3 { margin: 0; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; transition: background .15s; }
.cat-row:hover { background: rgba(255, 255, 255, .05); }
.cat-main { flex: 1; min-width: 0; display: grid; }
.cat-main small { font-size: 12px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot.saida { background: var(--out); box-shadow: 0 0 10px rgba(248, 113, 113, .6); }
.dot.entrada { background: var(--in); box-shadow: 0 0 10px rgba(52, 211, 153, .6); }
.cat-actions { display: flex; gap: 14px; font-size: 13px; opacity: .55; transition: opacity .15s; }
.cat-row:hover .cat-actions, .cat-row:focus-within .cat-actions { opacity: 1; }
.cat-actions form { display: inline; margin: 0; }
@media (hover: none) { .cat-actions { opacity: 1; } }
@media (max-width: 1400px) { .cat-cols { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
/* ===== login: fundo azul de tela cheia com o formulário centralizado ===== */
.authwrap {
    position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; place-items: center; min-height: 100vh;
    background: linear-gradient(145deg, #12326b 0%, #1e1b6b 55%, #0a1a3f 100%);
}
.authwrap .orb { z-index: 0; }
.o3 { width: 260px; height: 260px; left: 55%; bottom: 8%; background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, .30), transparent 70%); animation: float 13s ease-in-out infinite; }
.authwrap .authside { position: relative; z-index: 1; width: 100%; padding: 32px 20px; display: grid; place-items: center; }
.authwrap .auth { max-width: 420px; }
.authwrap .auth > .muted { color: rgba(255, 255, 255, .72); }
.authwrap .auth .form { background: rgba(8, 18, 44, .62); border: 1px solid rgba(160, 190, 255, .22); backdrop-filter: blur(16px); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); padding: 26px; }
.forgot { text-align: center; font-size: 14px; font-weight: 600; }
.dica { padding: 12px 14px; border-radius: 12px; background: rgba(59, 130, 246, .12); border-left: 3px solid var(--accent); display: grid; gap: 2px; }
.dica small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.dica b { font-size: 16px; color: var(--text); }
/* ================= v8: novas páginas, tema claro, impressão ================= */
.side { overflow: hidden; }
.menu { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.grp { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); opacity: .75; padding: 14px 12px 4px; font-weight: 700; }
.grp:first-child { padding-top: 2px; }
a.me { color: var(--text); text-decoration: none; }
a.me:hover, a.me.on { background: rgba(59, 130, 246, .16); }
.topact { display: flex; gap: 10px; align-items: center; }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.iconbtn:hover { background: var(--panel2); }
.iconbtn svg { width: 20px; height: 20px; }
@media (max-width: 760px) {
    .hide-m { display: none; }
    .topact { display: flex; }
    .tabbar { grid-template-columns: repeat(5, 1fr); }
    .tabbar a { padding: 15px 2px; font-size: 11px; }
}

.small { font-size: 13px; }
.badge { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--muted); }
.badge.pago { background: rgba(52, 211, 153, .15); color: var(--in); }
.badge.atrasada { background: rgba(248, 113, 113, .18); color: var(--out); }
.badge.hoje { background: rgba(251, 191, 36, .18); color: var(--warn); }
.badge.breve { background: rgba(59, 130, 246, .18); color: #7db4ff; }
.item.conta.atrasada { box-shadow: inset 3px 0 0 var(--out); padding-left: 12px; }
.item.conta.hoje { box-shadow: inset 3px 0 0 var(--warn); padding-left: 12px; }
.item.conta.pago { opacity: .72; }
.payform { display: inline-flex; gap: 6px; align-items: center; }
.payform input[type=date] { width: auto; padding: 6px 8px; font-size: 13px; }
.item .right .actions { flex-wrap: wrap; align-items: center; }
.prevchip { display: block; margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: rgba(52, 211, 153, .10); border: 1px solid rgba(52, 211, 153, .3); color: var(--text); }
.prevchip.neg { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); }
.prevchip span { float: right; color: var(--muted); font-size: 13px; }

.lim-cards.one { grid-template-columns: 1fr; }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0; padding: 16px 18px; }
.rec-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.rec-main > div { display: grid; gap: 2px; min-width: 0; }
.rec-main .dot { margin-top: 7px; }
.rec.pausada { opacity: .55; }
.meta { display: grid; gap: 10px; margin: 0; }
.meta.feita { border-color: rgba(52, 211, 153, .5); box-shadow: 0 0 0 1px rgba(52, 211, 153, .15), 0 10px 34px rgba(52, 211, 153, .12); }
.metabar { position: relative; height: 24px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.metabar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.metabar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.meta.feita .metabar i { background: linear-gradient(90deg, #059669, var(--in)); }
.aporte { display: flex; gap: 8px; }
.aporte input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; }
.mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px dashed var(--line); }

.filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.filtros label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.filtros input, .filtros select { padding: 10px 12px; font-size: 14px; }
.filtros-btn { display: flex; gap: 8px; flex-wrap: wrap; }
.export { display: flex; gap: 14px; font-size: 13px; flex-wrap: wrap; }
.paginas { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.paginas a.off { opacity: .35; pointer-events: none; }
.clip { display: inline-flex; gap: 4px; align-items: center; }
.check { display: flex !important; grid-template-columns: none; gap: 8px; align-items: center; margin-top: 6px; }
.check input { width: auto; }
.conta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.conta-grid .card.form { max-width: none; margin: 0 0 18px; }
.conta-grid .card { margin-bottom: 18px; }
@media (max-width: 1100px) { .conta-grid { grid-template-columns: 1fr; } }
code { background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

.mais-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 6px; }
.mais-item { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 0; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; width: 100%; }
.mais-item svg { width: 22px; height: 22px; flex: none; color: #7db4ff; }
.mais-item.sair { color: var(--out); } .mais-item.sair svg { color: var(--out); }
@media (min-width: 761px) { .mais-grid { grid-template-columns: repeat(3, 1fr); } }

.chartbox.tall { height: 360px; }
.rel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.rel-head h2 { margin: 0 0 2px; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tabela th, .tabela td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabela .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela .soma td { border-top: 2px solid var(--line); border-bottom: 0; }

/* ---------- tema claro ---------- */
html[data-theme="light"] {
    --bg: #eef3fb; --panel: rgba(255, 255, 255, .92); --panel-solid: #fff; --panel2: #e1eafb; --line: rgba(30, 64, 120, .15);
    --text: #0f1f3d; --muted: #5a6f94; --in: #059669; --out: #dc2626; --warn: #b45309; --empresa: #0284c7; --pessoal: #7c3aed;
}
html[data-theme="light"] body {
    background: radial-gradient(1100px 600px at 85% -10%, rgba(59, 130, 246, .14), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(99, 102, 241, .10), transparent 60%), var(--bg);
}
html[data-theme="light"] a { color: #1d4ed8; }
html[data-theme="light"] .side { background: linear-gradient(180deg, #fff, #f1f6ff); }
html[data-theme="light"] .top { background: rgba(238, 243, 251, .85); }
html[data-theme="light"] .card { box-shadow: 0 8px 26px rgba(30, 64, 120, .08); }
html[data-theme="light"] .menu a.on { color: #0b2a6b; background: linear-gradient(90deg, rgba(59, 130, 246, .20), rgba(59, 130, 246, .04)); }
html[data-theme="light"] .menu a:hover, html[data-theme="light"] .logout:hover { background: rgba(59, 130, 246, .10); }
html[data-theme="light"] .me { background: rgba(30, 64, 120, .06); }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: #f6f9ff; color: var(--text); }
html[data-theme="light"] select option { background: #fff; color: #0f1f3d; }
html[data-theme="light"] .choice span { background: #f1f5fd; }
html[data-theme="light"] .bar, html[data-theme="light"] .metabar { background: rgba(30, 64, 120, .11); }
html[data-theme="light"] .ring { background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(30, 64, 120, .12) 0); }
html[data-theme="light"] .ring::before { background: #fff; }
html[data-theme="light"] .insights li, html[data-theme="light"] .badge { background: rgba(30, 64, 120, .06); }
html[data-theme="light"] .badge.pago { background: rgba(5, 150, 105, .14); }
html[data-theme="light"] .badge.atrasada { background: rgba(220, 38, 38, .12); }
html[data-theme="light"] .badge.hoje { background: rgba(180, 83, 9, .14); }
html[data-theme="light"] .badge.breve { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
html[data-theme="light"] .item:hover, html[data-theme="light"] .cat-row:hover { background: rgba(30, 64, 120, .04); }
html[data-theme="light"] .sum, html[data-theme="light"] .presets button { background: rgba(30, 64, 120, .07); }
html[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .97); }
html[data-theme="light"] .drawer { background: #fff; }
html[data-theme="light"] .x { background: rgba(30, 64, 120, .08); }
html[data-theme="light"] .scrim { background: rgba(15, 31, 61, .42); }
html[data-theme="light"] .flash.ok { background: #d9f7ea; border-color: #86e0bb; color: #065f46; }
html[data-theme="light"] .flash.erro { background: #fde2e2; border-color: #f5a3a3; color: #7f1d1d; }
html[data-theme="light"] .flash.aviso { background: #fdf0cc; border-color: #f0cf7a; color: #7a4a05; }
html[data-theme="light"] .tag.empresa { background: rgba(2, 132, 199, .12); }
html[data-theme="light"] .tag.pessoal { background: rgba(124, 58, 237, .12); }
html[data-theme="light"] .chip button { background: rgba(30, 64, 120, .10); }
html[data-theme="light"] .dica { background: rgba(37, 99, 235, .08); }
html[data-theme="light"] .prevchip { background: rgba(5, 150, 105, .08); }
html[data-theme="light"] .prevchip.neg { background: rgba(220, 38, 38, .08); }
html[data-theme="light"] .lim-card.estourou, html[data-theme="light"] .meta.feita { box-shadow: 0 8px 26px rgba(30, 64, 120, .08); }
html[data-theme="light"] code { background: rgba(30, 64, 120, .08); }
html[data-theme="light"] .mais-item svg { color: #2563eb; }
/* a tela de login continua escura nos dois temas */
html[data-theme="light"] body.guest {
    --text: #eaf0ff; --muted: #8ea6d0; --line: rgba(120, 165, 255, .16); --panel: rgba(18, 35, 66, .72); --in: #34d399; --out: #f87171; --warn: #fbbf24;
    color: var(--text);
}
html[data-theme="light"] body.guest a { color: #86b8ff; }
html[data-theme="light"] body.guest input { background: rgba(4, 10, 22, .65); color: #eaf0ff; }
html[data-theme="light"] body.guest .flash.ok { background: rgba(16, 122, 88, .25); border-color: #1c6b52; color: #b7f5dd; }
html[data-theme="light"] body.guest .flash.erro { background: rgba(179, 48, 58, .28); border-color: #8b2c35; color: #ffc9ce; }
html[data-theme="light"] body.guest .dica { background: rgba(59, 130, 246, .12); }

/* ---------- impressão (relatório / PDF) ---------- */
@media print {
    :root, html[data-theme="light"] { --text: #111; --muted: #555; --line: #cfd6e4; --panel: #fff; --in: #0a7a52; --out: #b3303a; }
    body { background: #fff !important; color: #111; font-size: 12px; }
    .side, .top, .tabbar, .fab, .noprint, .drawer, .scrim, .ios-hint, .flash { display: none !important; }
    .app { display: block; }
    .wrap { padding: 0; animation: none; }
    .card { background: #fff; border: 1px solid #cfd6e4; box-shadow: none; backdrop-filter: none; break-inside: avoid; }
    .cards, .grid { gap: 10px; }
    a { color: #111; }
    .tag { border: 1px solid #cfd6e4; background: none !important; color: #111 !important; }
}
.menu { scrollbar-width: thin; scrollbar-color: rgba(120, 165, 255, .28) transparent; }
.menu::-webkit-scrollbar { width: 6px; }
.menu::-webkit-scrollbar-thumb { background: rgba(120, 165, 255, .28); border-radius: 6px; }
.hero-card, .hero-card .big-num, .hero-card .pill { color: #fff; }
/* botão Editar das categorias: sempre visível */
.cat-actions { opacity: 1; align-items: center; }
.editbtn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(59, 130, 246, .12); color: #9cc4ff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.editbtn:hover { background: var(--accent); color: #fff; border-color: transparent; }
html[data-theme="light"] .editbtn { color: #1d4ed8; background: rgba(37, 99, 235, .08); }
html[data-theme="light"] .editbtn:hover { color: #fff; background: var(--accent); }
/* ================= lançamento por voz ================= */
.voz { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(59, 130, 246, .08); border: 1px dashed rgba(59, 130, 246, .45); }
.voz-row { display: flex; gap: 8px; }
.voz-row .voz-input { flex: 1; min-width: 0; }
.voz-mic { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 18px rgba(59, 130, 246, .45); transition: .15s; }
.voz-mic svg { width: 22px; height: 22px; }
.voz-mic:hover { transform: scale(1.06); }
.voz-mic.on { background: linear-gradient(135deg, #ef4444, #f97316); animation: pulsa 1.1s ease-in-out infinite; }
.voz-mic.off { opacity: .45; }
@keyframes pulsa { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 50% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); } }
.voz-status { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.2em; }
.voz-status.ok { color: var(--in); } .voz-status.aviso { color: var(--warn); } .voz-status.erro { color: var(--out); }
.voz.feito { border-style: solid; border-color: rgba(52, 211, 153, .55); background: rgba(52, 211, 153, .08); }

.voz.grande { text-align: center; padding: 22px 16px; }
.voz.grande .voz-mic { width: 92px; height: 92px; margin: 0 auto; }
.voz.grande .voz-mic svg { width: 40px; height: 40px; }
.voz.grande .voz-input { text-align: center; }
.voz-dica { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.voz-exemplos { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: var(--text); }
.voz-exemplos li { opacity: .85; }
.rapido { max-width: 640px; margin: 0 auto; }
.rapido .card.form { max-width: none; }
.atalhos ul { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 8px; }
kbd { background: rgba(255, 255, 255, .1); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font: inherit; font-size: 13px; font-weight: 700; }
html[data-theme="light"] kbd { background: #fff; }
html[data-theme="light"] .voz { background: rgba(37, 99, 235, .06); }
html[data-theme="light"] .voz.feito { background: rgba(5, 150, 105, .08); }

/* segundo botão flutuante (microfone) no celular */
@media (max-width: 760px) {
    .fab.fab2 { width: 48px; height: 48px; right: 22px; bottom: calc(144px + env(safe-area-inset-bottom)); background: linear-gradient(135deg, #0ea5e9, var(--accent)); }
    .fab.fab2 svg { width: 22px; height: 22px; }
}
/* ============ contas bancárias e cartões ============ */
.banco { margin: 0; display: grid; gap: 12px; }
.banco.pausada, .cartao.pausada { opacity: .55; }
.banco-top, .cartao-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.banco-top > div, .cartao-top > div { display: grid; gap: 3px; }
.banco-saldo { font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conferir { display: flex; gap: 8px; }
.conferir input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; }
.cartao { margin: 0; display: grid; gap: 14px; border-left: 4px solid var(--line); background-image: linear-gradient(135deg, rgba(99, 102, 241, .10), transparent 55%); }
.cartao.empresa { border-left-color: var(--empresa); } .cartao.pessoal { border-left-color: var(--pessoal); }
.cartao-top small { color: var(--muted); }
.cartao-fatura { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.cartao-fatura > div { display: grid; }
.cartao-valor { font-size: 26px; font-variant-numeric: tabular-nums; }
html[data-theme="light"] .cartao-fatura { background: rgba(30, 64, 120, .06); }
/* ============ hospedagem ============ */
.diag.erro { box-shadow: inset 3px 0 0 var(--out); padding-left: 12px; }
.diag.aviso { box-shadow: inset 3px 0 0 var(--warn); padding-left: 12px; }
.guia ol { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.guia li { line-height: 1.55; padding-left: 4px; }
.guia code { word-break: break-all; }
.hosp-wide { max-width: 920px; width: 100%; color: var(--text); text-align: left; }

/* ============ página Lançar por voz (v2) ============ */
.rapido2 { max-width: 1080px; margin: 0 auto; }
.rapido-grid { display: grid; grid-template-columns: minmax(300px, 390px) 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
.rapido-grid .voz.grande { position: sticky; top: 104px; padding: 30px 20px 22px; gap: 14px; border-style: solid; border-color: rgba(59, 130, 246, .35);
    background: radial-gradient(120% 90% at 50% 0%, rgba(59, 130, 246, .22), rgba(59, 130, 246, .06) 60%); }
.rapido-grid .voz.grande .voz-mic { width: 110px; height: 110px; animation: halo 2.6s ease-in-out infinite; }
.rapido-grid .voz.grande .voz-mic svg { width: 46px; height: 46px; }
.rapido-grid .voz.grande .voz-mic.on { animation: pulsa 1.1s ease-in-out infinite; }
@keyframes halo { 0%, 100% { box-shadow: 0 8px 26px rgba(59, 130, 246, .45), 0 0 0 0 rgba(59, 130, 246, .35); } 50% { box-shadow: 0 8px 26px rgba(59, 130, 246, .45), 0 0 0 18px rgba(59, 130, 246, 0); } }
.voz-dica { margin: 2px 0 0; font-size: 15px; color: var(--text); font-weight: 600; }
.voz-ou { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.voz-ou::before, .voz-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.voz-status:empty { display: none; }
.voz.grande .voz-status { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13px; line-height: 1.45; text-align: left; }
.voz.grande .voz-status.ok { background: rgba(52, 211, 153, .12); }
.voz.grande .voz-status.aviso { background: rgba(251, 191, 36, .12); }
.voz.grande .voz-status.erro { background: rgba(248, 113, 113, .14); }

.rapido-campos { margin: 0; display: grid; gap: 16px; }
.rapido-campos .row h3 { margin: 0; }
.rapido-campos label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.rapido-campos input.big { font-size: 24px; }
.rapido-campos input.data-grande { padding: 15px 14px; }
.grande-btn { padding: 16px; font-size: 16px; }
.rapido-baixo { margin-bottom: 0; }

@media (max-width: 900px) {
    .rapido-grid { grid-template-columns: 1fr; }
    .rapido-grid .voz.grande { position: static; }
}
@media (max-width: 560px) {
    .duo { grid-template-columns: 1fr; }
    .rapido-grid .voz.grande .voz-mic { width: 96px; height: 96px; }
}
@media (max-width: 760px) { .atalho-tecla { display: none; } }

/* ============ Lançar por voz (v3): cartão "Entendi", atalhos e avisos ============ */
.rapido-direita { display: grid; gap: 16px; min-width: 0; }
.voz-toggle { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13px; color: var(--muted); cursor: pointer; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); line-height: 1.4; }
.voz-toggle input { width: auto; margin-top: 2px; flex: none; }
.voz-toggle b { color: var(--text); }

.rc-vazio { text-align: center; padding: 46px 24px; border-radius: 18px; border: 1px dashed var(--line); background: rgba(255, 255, 255, .02); }
.rc-vazio h3 { color: var(--text); font-size: 18px; margin: 12px 0 6px; }
.rc-vazio p { margin: 0 auto; max-width: 340px; }
.rc-vazio-icone { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(59, 130, 246, .14); color: #7db4ff; }
.rc-vazio-icone svg { width: 30px; height: 30px; }

.rc { padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 14px; animation: rise .35s ease both; position: relative; overflow: hidden; }
.rc::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--out); }
.rc.entrada::before { background: var(--in); }
.rc.saida { background-image: linear-gradient(135deg, rgba(248, 113, 113, .10), transparent 55%); }
.rc.entrada { background-image: linear-gradient(135deg, rgba(52, 211, 153, .12), transparent 55%); }
.rc-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-tipo { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; padding: 4px 11px; border-radius: 99px; background: rgba(248, 113, 113, .18); color: var(--out); }
.rc.entrada .rc-tipo { background: rgba(52, 211, 153, .18); color: var(--in); }
.rc-data { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 14px; }
.rc-valor { all: unset; cursor: pointer; font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--out); }
.rc.entrada .rc-valor { color: var(--in); }
.rc-valor:hover { filter: brightness(1.15); }
.rc-valor.falta { opacity: .45; }
.rc-desc { font-size: 20px; font-weight: 700; word-break: break-word; }
.rc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-chip { padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; }
.rc-chip.vazio { opacity: .5; font-weight: 500; }
.rc-aviso { padding: 10px 12px; border-radius: 10px; background: rgba(251, 191, 36, .14); color: var(--warn); font-size: 13px; font-weight: 600; }
.rc-acoes { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 4px; }
.rc-acoes .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

details.rapido-campos { margin: 0; padding: 0; }
details.rapido-campos summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--muted); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.rapido-campos summary::-webkit-details-marker { display: none; }
details.rapido-campos summary::after { content: "▾"; transition: transform .2s; }
details.rapido-campos[open] summary::after { transform: rotate(180deg); }
details.rapido-campos[open] summary { color: var(--text); border-bottom: 1px solid var(--line); }
.rc-campos { display: grid; gap: 16px; padding: 16px 18px 18px; }

.rc-freq { margin: 0; }
.rc-freq .row { margin-bottom: 12px; }
.rc-freq h3 { margin: 0; }
.freq-lista { display: flex; flex-wrap: wrap; gap: 10px; }
.freq { display: grid; gap: 2px; text-align: left; padding: 11px 15px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; cursor: pointer; transition: .15s; }
.freq b { font-size: 14px; }
.freq span { font-size: 12px; color: var(--muted); }
.freq.in { border-left: 3px solid var(--in); } .freq.out { border-left: 3px solid var(--out); }
.freq:hover { transform: translateY(-2px); background: rgba(59, 130, 246, .14); border-color: rgba(59, 130, 246, .5); }

.item.novo { animation: entra .6s ease both; }
@keyframes entra { from { background: rgba(52, 211, 153, .25); transform: translateX(-12px); opacity: 0; } to { background: transparent; transform: none; opacity: 1; } }

.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: grid; gap: 10px; width: min(460px, calc(100% - 28px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: #0f2a4d; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); font-weight: 600; animation: rise .3s ease both; transition: opacity .3s, transform .3s; }
.toast.ok { border-color: rgba(52, 211, 153, .5); } .toast.erro { border-color: rgba(248, 113, 113, .6); background: #3b1620; } .toast.aviso { border-color: rgba(251, 191, 36, .6); background: #3a2d10; }
.toast.sai { opacity: 0; transform: translateY(10px); }
.toast button { flex: none; background: rgba(255, 255, 255, .12); border: 0; color: #fff; padding: 6px 14px; border-radius: 99px; font: inherit; font-weight: 700; cursor: pointer; }
.toast button:hover { background: var(--accent); }
@media (max-width: 760px) { .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); } }

html[data-theme="light"] .rc-vazio { background: rgba(30, 64, 120, .03); }
html[data-theme="light"] .rc-chip, html[data-theme="light"] .voz-toggle, html[data-theme="light"] .freq { background: rgba(30, 64, 120, .06); }
html[data-theme="light"] .toast { background: #fff; color: #0f1f3d; }
html[data-theme="light"] .toast.erro { background: #fde2e2; } html[data-theme="light"] .toast.aviso { background: #fdf0cc; }
html[data-theme="light"] .toast button { background: rgba(30, 64, 120, .12); color: #0f1f3d; }