/* Cred24 Pay — design system */
:root {
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #f0f3f1; --line: #e3e8e5;
  --ink: #0f1d17; --ink-2: #4b5d55; --ink-3: #85958e;
  --brand: #047857; --brand-2: #059669; --brand-soft: #e3f4ec; --brand-ink: #ffffff;
  --gold: #c58a12;
  --good: #0a8f4a; --good-soft: #e4f6ec; --bad: #d93a3a; --bad-soft: #fde9e9; --warn: #c27c00; --warn-soft: #fff4dc;
  --s1: #257de0; --s2: #f47230; --s3: #00b894; --s4: #f2a600; --s5: #ee7fac; --s6: #8a948f;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 29, 23, .04), 0 6px 24px rgba(15, 29, 23, .06);
  --nav-h: 68px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1210; --surface: #121c18; --surface-2: #18241f; --line: #233129;
  --ink: #ecf3ef; --ink-2: #a8b7b0; --ink-3: #6f8078;
  --brand: #10b981; --brand-2: #34d399; --brand-soft: #0f2c22; --brand-ink: #04140d;
  --good: #22c55e; --good-soft: #0f2a1b; --bad: #f26363; --bad-soft: #321616; --warn: #f2b233; --warn-soft: #2e2410;
  --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #6c7772;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.pos { color: var(--good); } .neg { color: var(--bad); }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.login-art { display: none; background: #06251a center/cover no-repeat; position: relative; }
.login-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 30, 21, .1), rgba(4, 30, 21, .85)); }
.login-art .quote { position: absolute; left: 48px; right: 48px; bottom: 48px; z-index: 1; color: #fff; }
.login-art .quote h2 { font-size: 34px; line-height: 1.1; margin: 0 0 10px; letter-spacing: -.02em; }
.login-art .quote p { margin: 0; opacity: .8; font-size: 16px; }
.login-box { display: flex; flex-direction: column; justify-content: center; padding: 32px 24px; max-width: 420px; width: 100%; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #059669, #047857 60%, #065f46); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px rgba(4, 120, 87, .35); }
.logo-mark svg { width: 22px; height: 22px; }
.login-box h1 { font-size: 28px; letter-spacing: -.02em; margin: 36px 0 6px; }
.login-box .sub { color: var(--ink-2); margin: 0 0 28px; }
@media (min-width: 900px) { .login { grid-template-columns: 1.1fr 1fr; } .login-art { display: block; } }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; height: 48px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); padding: 0 14px; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
textarea.input { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .eye { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; border-radius: 10px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.money { position: relative; }
.money .pre { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.money .input { padding-left: 44px; font-weight: 700; font-size: 18px; }
.money.big .input { height: 60px; font-size: 26px; }
.money.big .pre { font-size: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { height: 48px; border-radius: var(--radius-sm); border: 0; padding: 0 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, filter .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; min-width: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: none; height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Shell ---------- */
.app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.top h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 4px 18px 20px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-in { max-width: 560px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 6px 0; }
.nav a.on { color: var(--brand); }
.nav a.fab span.b { width: 52px; height: 52px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; margin-top: -26px; box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 40%, transparent); }
.nav a.fab span.b svg { width: 26px; height: 26px; }
.side { display: none; }
@media (min-width: 1024px) {
  .app { padding-bottom: 24px; padding-left: 240px; }
  .nav { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: 240px; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; gap: 4px; z-index: 30; }
  .side .logo { padding: 0 8px 22px; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; color: var(--ink-2); }
  .side a.on { background: var(--brand-soft); color: var(--brand); }
  .side a.cta { background: var(--brand); color: var(--brand-ink); margin-bottom: 12px; justify-content: center; }
  .side .sp { flex: 1; }
}

/* ---------- Cards / KPIs ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h3 { margin: 0 0 2px; font-size: 15px; letter-spacing: -.01em; }
.card .hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px; }
.grid { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.kpi .lb { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .lb svg { width: 16px; height: 16px; }
.kpi .v { font-weight: 800; letter-spacing: -.03em; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.kpi .d { font-size: 12px; font-weight: 700; margin-top: 4px; display: inline-flex; align-items: center; gap: 3px; }
.kpi .d.up { color: var(--good); } .kpi .d.down { color: var(--bad); } .kpi .d.eq { color: var(--ink-3); }
.hero { background: linear-gradient(135deg, #065f46, #047857 55%, #059669); color: #fff; border-radius: 22px; padding: 20px; position: relative; overflow: hidden; box-shadow: 0 14px 34px rgba(4, 120, 87, .28); }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); }
.hero .lb { opacity: .85; font-size: 13px; font-weight: 600; }
.hero .v { font-size: clamp(30px, 8vw, 44px); font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.hero .mini { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.hero .mini b { display: block; font-size: 16px; }
.hero .pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .16); border-radius: 99px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.dash-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: 1fr 1fr; } .dash-grid .span2 { grid-column: span 2; } }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; align-items: center; }
.filters::-webkit-scrollbar { display: none; }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-3); font-size: 11px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.45; white-space: nowrap; z-index: 5; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; box-shadow: var(--shadow); }
.tip b { font-weight: 700; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars-h { display: flex; flex-direction: column; gap: 12px; }
.bh .top-l { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; gap: 8px; }
.bh .top-l b { font-weight: 700; }
.bh .track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; display: flex; }
.bh .fill { height: 100%; border-radius: 6px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.list-top { display: flex; flex-direction: column; }
.list-top .it { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-top .it:last-child { border-bottom: 0; }
.rank { width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }

/* ---------- Planilha ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { flex: 1; min-width: 200px; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.search .input { padding-left: 40px; height: 44px; }
.select { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 10px; font-weight: 600; font-size: 14px; outline: none; }
.totbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 760px) { .totbar { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.totbar div { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); min-width: 0; }
.totbar small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.totbar b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100dvh - 300px); display: none; }
.sheet table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.sheet th { position: sticky; top: 0; background: var(--surface-2); text-align: right; padding: 11px 12px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1; border-bottom: 1px solid var(--line); }
.sheet th.l, .sheet td.l { text-align: left; }
.sheet td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sheet tr:hover td { background: var(--surface-2); cursor: pointer; }
.sheet th .ar { opacity: .5; margin-left: 4px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .03em; background: var(--surface-2); color: var(--ink-2); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.cards-list { display: flex; flex-direction: column; gap: 10px; }
.op { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; cursor: pointer; }
.op .t { font-weight: 700; font-size: 15px; }
.op .s { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.op .r { text-align: right; }
.op .l { font-weight: 800; color: var(--good); font-size: 15px; }
.day-h { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 10px 2px 2px; display: flex; justify-content: space-between; }
@media (min-width: 900px) { .sheet { display: block; } .cards-list { display: none; } }
.more { display: flex; justify-content: center; padding: 16px; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-3); }
.empty svg { width: 44px; height: 44px; margin-bottom: 8px; }

/* ---------- Nova operação ---------- */
.nova-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .nova-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } .resumo-sticky { position: sticky; top: 80px; } }
.resumo { background: linear-gradient(160deg, #0b2a1f, #0d3b2b); color: #eafff5; border-radius: 22px; padding: 20px; box-shadow: 0 14px 34px rgba(6, 60, 42, .3); }
.resumo .ln { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .14); font-size: 14px; gap: 10px; }
.resumo .ln span:first-child { opacity: .75; }
.resumo .ln b { font-weight: 700; }
.resumo .lucro { margin-top: 14px; }
.resumo .lucro small { opacity: .75; font-size: 13px; }
.resumo .lucro .v { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.03em; color: #5ef0a8; }
.resumo .lucro .v.neg { color: #ff8b8b; }
.resumo .margem { display: inline-flex; background: rgba(94, 240, 168, .14); color: #8af5c0; padding: 3px 10px; border-radius: 99px; font-weight: 700; font-size: 12.5px; margin-top: 4px; }
.section-t { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 4px 0 8px; }
.mode { margin-bottom: 14px; }

/* ---------- Sheet modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(5, 15, 11, .5); z-index: 50; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.backdrop.on { opacity: 1; }
.modal { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--surface); border-radius: 22px 22px 0 0; max-height: 92dvh; overflow: auto; transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); }
.modal.on { transform: none; }
.modal .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.modal h2 { margin: 0 0 14px; font-size: 19px; letter-spacing: -.02em; display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 760px) { .modal { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; border-radius: 22px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; } .modal.on { transform: translate(-50%, -50%); opacity: 1; } .modal .grab { display: none; } }
.det { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.det div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.det small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
.det b { font-size: 15px; }

/* ---------- Taxas ---------- */
.tx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 8px 4px; text-align: center; }
.tx-table td { padding: 4px; text-align: center; }
.tx-table td:first-child { font-weight: 700; color: var(--ink-2); }
.tx-table input { width: 100%; min-width: 64px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); text-align: center; font-weight: 600; outline: none; }
.tx-table input:focus { border-color: var(--brand); }
.scroll-x { overflow-x: auto; }

/* ---------- Mais ---------- */
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border: 0; background: none; border-bottom: 1px solid var(--line); text-align: left; font-weight: 600; cursor: pointer; width: 100%; }
.menu-list .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.menu-list small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12.5px; }

/* ---------- Toast / loading ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; z-index: 80; opacity: 0; transition: all .25s; display: flex; gap: 8px; align-items: center; max-width: 92vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 24px; } }
.sk { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
.fade-in { animation: fi .25s ease-out; }
@keyframes fi { from { opacity: 0; transform: translateY(6px); } }

/* ajustes mobile */
.row2 > * { min-width: 0; }
.mode .seg { display: flex; width: 100%; }
.mode .seg button { flex: 1; padding: 0 6px; font-size: 12.5px; }
.money .auto { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; height: 20px; background: var(--brand-soft); color: var(--brand); }
.money.big .input { padding-right: 10px; }
@media (max-width: 520px) { .money.big .input { font-size: 20px; height: 56px; padding-left: 38px; } .money.big .pre { font-size: 15px; left: 12px; } .money .auto { top: -9px; transform: none; right: 8px; } }
.nova-grid > * { min-width: 0; }
@media (max-width: 759px) { .totbar div:last-child:nth-child(odd) { grid-column: span 2; } }

/* ---------- Multi-negócio / perfis ---------- */
.top .tt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top .tt h1 { flex: none; }
.neg-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 9px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 12.5px; cursor: pointer; max-width: 100%; color: var(--ink); }
.neg-btn .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.neg-btn svg { width: 15px; height: 15px; color: var(--ink-3); }
.neg-btn .dot, .neg-opt .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.neg-list { display: flex; flex-direction: column; gap: 6px; }
.neg-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; text-align: left; }
.neg-opt span:nth-child(2) { flex: 1; }
.neg-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
@media (max-width: 520px) { .top .tt { flex-direction: column; align-items: flex-start; gap: 4px; } .top h1 { font-size: 18px; } }
.av { width: 40px; height: 40px; border-radius: 13px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.av svg { width: 20px; height: 20px; }
.side a.me { padding: 10px; gap: 10px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 14px; }
.side a.me .av { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.side a.me small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.me-card { display: flex; align-items: center; gap: 12px; }
.me-card .av { width: 48px; height: 48px; border-radius: 15px; font-size: 19px; }
.info-card { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; background: var(--brand-soft); box-shadow: none; }
.info-card > svg { color: var(--brand); width: 24px; height: 24px; margin-top: 2px; }
.info-card p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-it { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%; }
.user-it > svg { color: var(--ink-3); width: 18px; height: 18px; }
.user-it.off { opacity: .55; }
.user-it .ui { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.user-it .ui small { color: var(--ink-3); font-size: 12.5px; }
.user-it .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.tag.t-lock { background: var(--warn-soft); color: var(--warn); }
.tag svg { width: 12px; height: 12px; margin-right: 4px; }
.papeis { display: grid; gap: 8px; }
@media (min-width: 560px) { .papeis { grid-template-columns: repeat(3, 1fr); } }
.papeis button { text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.papeis button small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.papeis button.on { border-color: var(--brand); background: var(--brand-soft); }
.papeis button.on b { color: var(--brand); }
.papeis button[disabled] { opacity: .4; cursor: not-allowed; }
.perm-list { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.perm { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; cursor: pointer; }
.perm-list .perm + .perm { border-top: 1px solid var(--line); }
.perm b { font-size: 14px; } .perm small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.sw { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.sw:checked { background: var(--brand); } .sw:checked::after { transform: translateX(18px); }
.alerta { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-top: 12px; }
.alerta svg { width: 18px; height: 18px; margin-top: 1px; }
.chip.cor { width: 44px; padding: 0; }
.chip.cor span { width: 22px; height: 22px; border-radius: 50%; background: var(--c); }
.chip.cor.on { background: var(--surface); border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.tx-table.ro input { background: var(--surface-2); border-color: transparent; pointer-events: none; }
select.input { appearance: auto; }

/* ---------- Comprovantes (leitura por IA) ---------- */
.abas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 16px; margin-bottom: 16px; }
.abas button { border: 0; background: none; border-radius: 12px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.abas button svg { width: 19px; height: 19px; }
.abas button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
@media (min-width: 520px) { .abas button { flex-direction: row; gap: 8px; font-size: 14px; height: 46px; } }
.ia-hint { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--s1) 10%, var(--surface))); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.ia-hint > svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.ia-hint b { font-size: 14px; } .ia-hint small { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 18px; padding: 26px 16px; cursor: pointer; background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: var(--brand-soft); border-color: var(--brand); }
.drop .ic { width: 54px; height: 54px; border-radius: 17px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.drop .ic svg { width: 26px; height: 26px; }
.drop b { font-size: 15.5px; } .drop small { color: var(--ink-3); font-size: 12.5px; }
.drop.mini { flex-direction: row; padding: 12px 14px; gap: 12px; border-width: 1.5px; justify-content: flex-start; text-align: left; }
.drop.mini .ic { width: 38px; height: 38px; border-radius: 12px; box-shadow: none; } .drop.mini .ic svg { width: 19px; height: 19px; }
.drop.mini b { font-size: 14px; } .drop.mini small { display: none; }
.cp-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.cp-list:empty { display: none; }
.cp-card { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px; background: var(--surface); }
.cp-card.dup { border-color: var(--bad); background: color-mix(in srgb, var(--bad-soft) 40%, var(--surface)); }
.cp-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cp-thumb { width: 54px; height: 66px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; padding: 0; cursor: zoom-in; flex: none; display: grid; place-items: center; color: var(--ink-3); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-tt { flex: 1; min-width: 0; } .cp-tt b { display: block; font-size: 15px; }
.cp-tt small { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-top .icon-btn { box-shadow: none; background: var(--surface-2); width: 36px; height: 36px; color: var(--ink-3); }
.cp-top .icon-btn svg { width: 17px; height: 17px; }
.lendo { display: inline-flex; align-items: center; gap: 5px; color: var(--brand) !important; font-weight: 700; animation: pulso 1.2s ease-in-out infinite; }
.lendo svg { width: 14px; height: 14px; }
@keyframes pulso { 50% { opacity: .45; } }
.cp-sk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.cp-f .field { margin-bottom: 10px; } .cp-f .field label { font-size: 12px; }
.cp-f .input { height: 44px; font-size: 15px; }
.cp-f .money .input { font-size: 16px; padding-left: 38px; } .cp-f .money .pre { left: 12px; font-size: 14px; }
.cp-f .field.need .input { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.input.ro { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border-color: transparent; font-weight: 700; color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.input.ro svg { width: 16px; height: 16px; flex: none; }
.cp-calc { background: var(--surface-2); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cp-tx, .cp-liq { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cp-tx { flex-wrap: wrap; } .cp-tx span:first-child { flex: 1 1 100%; }
.cp-tx span:first-child, .cp-liq span { flex: 1; min-width: 0; color: var(--ink-2); font-weight: 600; }
.cp-tx b, .cp-liq b { font-size: 14.5px; white-space: nowrap; }
.cp-pct { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ink-2); }
.cp-pct input { width: 62px; height: 32px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--surface); text-align: center; font-weight: 700; font-size: 14px; outline: none; color: var(--ink); }
.cp-pct input:focus { border-color: var(--brand); }
.cp-warn { display: flex; gap: 6px; align-items: center; color: var(--warn); font-size: 12.5px; font-weight: 600; }
.cp-warn svg { width: 15px; height: 15px; flex: none; }
.cp-card .alerta { margin-top: 10px; }
.alerta span { flex: 1; line-height: 1.4; }
.alerta.bad { background: var(--bad-soft); color: var(--bad); }
.cp-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; margin-top: 12px; }
.cp-sum small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cp-sum b { font-size: 18px; }
.cp-sum-m { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.cp-sum-m .tag svg { width: 12px; height: 12px; margin-right: 4px; }
.cli-comp { margin: 16px 0 0; }
.cli-comp label { font-size: 14px; font-weight: 700; color: var(--ink); }
.sug-btn { margin-top: 8px; border: 0; background: var(--brand-soft); color: var(--brand); border-radius: 11px; padding: 9px 12px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; text-align: left; }
.sug-btn svg { width: 15px; height: 15px; flex: none; }
.nova-main { min-width: 0; }
.cp-mini-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cp-mini { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 13px; padding: 8px; }
.cp-mini img, .cp-mini .ph { width: 44px; height: 54px; border-radius: 9px; object-fit: cover; display: grid; place-items: center; background: var(--surface); color: var(--ink-3); flex: none; }
.cp-mini > div { min-width: 0; font-size: 14px; }
.cp-mini small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.tx-table input.est { color: var(--ink-3); font-style: italic; border-style: dashed; }
.tx-table input.ofi { color: var(--brand); }
.maq-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.maq-bar .chip svg { width: 16px; height: 16px; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.legenda i { display: inline-block; width: 18px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line); vertical-align: -1px; margin-right: 5px; }
.legenda i.est { border-style: dashed; }
.alerta:has([data-retry]) { flex-wrap: wrap; }
.alerta [data-retry] { flex-basis: 100%; margin-top: 4px; background: var(--surface); color: inherit; font-weight: 700; }

/* ---- indicadores ---- */
.ind-it { align-items: flex-start; }
.ind-meses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ind-meses > span { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ind-meses small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ind-meses b { display: block; white-space: nowrap; }
.ind-op { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ind-op:last-child { border-bottom: 0; }
.ind-op .s { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.ind-tab { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.ind-tab.on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.ind-tab-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ind-rg { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ind-rg td { padding: 6px 2px; border-top: 1px solid var(--line); }
.ind-rg td:last-child { text-align: right; }
.rg-head, .rg-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 92px 38px; gap: 6px; align-items: center; }
.rg-head { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.rg-row { margin-bottom: 6px; }
.rg-row .input { padding: 9px 8px; font-size: 14px; min-width: 0; }
.rg-pad { grid-template-columns: minmax(0, 1fr) 92px 38px; background: var(--surface-2); border-radius: 12px; padding: 6px 0 6px 10px; }
.rg-lb small { display: block; font-size: 11.5px; color: var(--ink-3); }
.rg-parc { display: flex; align-items: center; gap: 4px; }
.rg-parc i, .rg-pct i { font-style: normal; color: var(--ink-3); font-size: 13px; }
.rg-pct { display: flex; align-items: center; gap: 4px; }
.rg-pct .input { text-align: right; }

/* ---- relatórios em PDF ---- */
.rel-wrap { max-width: 620px; margin: 0 auto; padding-bottom: 8px; }
.rel-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.rel-tipos button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 13px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.rel-tipos button .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.rel-tipos button .ic .i { width: 20px; height: 20px; }
.rel-tipos button b { display: block; font-size: 14.5px; }
.rel-tipos button small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }
.rel-tipos button.on { border-color: var(--brand); background: var(--brand-soft); }
.rel-tipos button.on .ic { background: var(--brand); color: var(--brand-ink); }
.rel-per { display: flex; flex-wrap: wrap; gap: 7px; }
.rel-per button { padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rel-per button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.rel-datas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rel-datas .field { margin: 0; min-width: 0; }
.rel-datas .input { width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
#opc .field { margin-bottom: 12px; }
.rel-prev { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.rel-prev-h { display: flex; align-items: center; gap: 12px; }
.rel-prev-h .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.rel-prev-h .ic .i { width: 22px; height: 22px; }
.rel-prev-h b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-prev-h small { display: block; font-size: 12.5px; color: var(--ink-3); }
.rel-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.rel-nums small { display: block; font-size: 11.5px; color: var(--ink-3); }
.rel-nums b { font-size: 15px; white-space: nowrap; }
.rel-acoes { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 14px; }
.rel-acoes .btn.off { opacity: .45; pointer-events: none; }
@media (max-width: 420px) { .rel-nums b { font-size: 13.5px; } }
