/* LCTX Patrimônio — interface
   Desenvolvido por Lucas Cardoso Teixeira — lucascardosoteixeira.com.br */
:root {
  color-scheme: light;
  --bg: #f3f4f8; --surface: #ffffff; --surface-2: #f7f8fb; --surface-3: #eef0f6;
  --ink: #0b0d12; --ink-2: #454c5e; --muted: #7a8194; --line: #e5e7ee; --line-2: #d7dae4;
  --accent: #3d5cff; --accent-2: #2c46d6; --accent-soft: rgba(61, 92, 255, .1);
  --pos: #0d8a5c; --neg: #cf3f33; --warn: #a86a00; --info: #2a78d6;
  --pos-soft: rgba(13, 138, 92, .1); --neg-soft: rgba(207, 63, 51, .1); --warn-soft: rgba(212, 140, 0, .14);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --ref: #8b90a0; --grid: #eceef3;
  --side: #0b0d12; --side-ink: #e9ebf3; --side-muted: #8a90a3; --side-line: rgba(255, 255, 255, .08);
  --shadow: 0 1px 2px rgba(11, 13, 18, .04), 0 12px 32px -20px rgba(23, 37, 120, .28);
  --r: 18px; --r-sm: 12px;
  --font: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07080c; --surface: #0f1118; --surface-2: #131621; --surface-3: #1a1e2b;
    --ink: #eef0f6; --ink-2: #b9bfcd; --muted: #808799; --line: #1e2230; --line-2: #2a2f40;
    --accent: #6d84ff; --accent-2: #8a9cff; --accent-soft: rgba(109, 132, 255, .14);
    --pos: #34c48b; --neg: #f07068; --warn: #e3a63a; --info: #3987e5;
    --pos-soft: rgba(52, 196, 139, .12); --neg-soft: rgba(240, 112, 104, .12); --warn-soft: rgba(227, 166, 58, .14);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --ref: #6f7587; --grid: #1a1e29;
    --side: #05060a; --side-line: rgba(255, 255, 255, .06);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -24px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080c; --surface: #0f1118; --surface-2: #131621; --surface-3: #1a1e2b;
  --ink: #eef0f6; --ink-2: #b9bfcd; --muted: #808799; --line: #1e2230; --line-2: #2a2f40;
  --accent: #6d84ff; --accent-2: #8a9cff; --accent-soft: rgba(109, 132, 255, .14);
  --pos: #34c48b; --neg: #f07068; --warn: #e3a63a; --info: #3987e5;
  --pos-soft: rgba(52, 196, 139, .12); --neg-soft: rgba(240, 112, 104, .12); --warn-soft: rgba(227, 166, 58, .14);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --ref: #6f7587; --grid: #1a1e29;
  --side: #05060a; --side-line: rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -24px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .tab { font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mk { font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.brand__mk .tx { -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.2px currentColor; }
.brand__sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); border-left: 1px solid var(--side-line); padding-left: 10px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 22px 14px 16px; }
.side .brand { padding: 0 10px 22px; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__h { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--side-muted); text-decoration: none; font-weight: 500; transition: background .2s, color .2s; position: relative; }
.nav a:hover { color: var(--side-ink); background: rgba(255, 255, 255, .04); }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .badge { margin-left: auto; }
.side__foot { margin-top: auto; border-top: 1px solid var(--side-line); padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3d5cff, #8e5cff); color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.side__u { min-width: 0; flex: 1; }
.side__u b { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__u small { color: var(--side-muted); font-size: 11.5px; }
.side__foot button { background: none; border: 0; color: var(--side-muted); padding: 6px; border-radius: 8px; cursor: pointer; }
.side__foot button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.credit { display: block; font-size: 11px; color: var(--side-muted); text-decoration: none; padding: 12px 6px 0; opacity: .8; }
.credit:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top__t { min-width: 0; flex: 1; }
.top__t h1 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__t p { margin: 1px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__mb { display: none; }
.view { padding: 8px 28px 48px; max-width: 1380px; width: 100%; }
.mnav { display: none; }

/* ---------- componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn--p { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--p:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--a { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--a:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--g { background: transparent; border-color: transparent; }
.btn--g:hover { background: var(--surface-3); border-color: transparent; }
.btn--d { color: var(--neg); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn--ic { width: 38px; padding: 0; }
.btn--sm.btn--ic { width: 32px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn:focus-visible, .inp:focus-visible, .seg button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card__h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card__h h2, .card__h h3 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.card__h p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card__h .sp { flex: 1; }
.card__b { padding: 16px 20px 20px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip--pos { background: var(--pos-soft); color: var(--pos); }
.chip--neg { background: var(--neg-soft); color: var(--neg); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--acc { background: var(--accent-soft); color: var(--accent); }
.chip svg.i { width: 13px; height: 13px; stroke-width: 2.2; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--neg); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); }
.seg button { border: 0; background: none; height: 28px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 13, 18, .12); }

/* KPIs */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 18px; }
.hero__main { position: relative; overflow: hidden; background: var(--side); color: #fff; border-color: transparent; padding: 24px; display: flex; flex-direction: column; min-height: 220px; }
.hero__main::after { content: ""; position: absolute; inset: auto -20% -60% 30%; height: 120%; background: radial-gradient(closest-side, rgba(61, 92, 255, .55), transparent); pointer-events: none; }
.hero__k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #9aa1b4; }
.hero__v { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin: 10px 0 8px; }
.hero__s { color: #b4bacb; font-size: 13.5px; position: relative; z-index: 1; }
.hero__s b { color: #fff; font-weight: 500; }
.hero__spark { margin-top: auto; height: 64px; position: relative; z-index: 1; padding-top: 14px; }
.hero__spark .spark { width: 100%; height: 64px; }
.hero__main .chip { background: rgba(255, 255, 255, .1); color: #fff; }
.hero__main .chip--pos { background: rgba(52, 196, 139, .18); color: #6fe0b2; }
.hero__main .chip--neg { background: rgba(240, 112, 104, .18); color: #ff9c95; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi__k { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi__k svg.i { width: 15px; height: 15px; }
.kpi__v { font-size: 23px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__s { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi--link { cursor: pointer; transition: border-color .2s, transform .2s; text-decoration: none; }
.kpi--link:hover { border-color: var(--accent); transform: translateY(-1px); }

/* gráficos */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ax text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln--draw { transition: stroke-dashoffset 1.5s cubic-bezier(.3, .8, .2, 1); }
.chart .ar { transition: opacity 1.2s ease .35s; }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.2, .9, .2, 1); }
.chart .bar--neg { transform-origin: 50% 0%; }
.chart.pre .bar { transform: scaleY(0); }
.chart .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .hp { stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.chart .mk { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.45; min-width: 150px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; font-weight: 600; margin-bottom: 3px; font-size: 12.5px; }
.tip i { display: flex; align-items: center; gap: 7px; font-style: normal; justify-content: space-between; }
.tip i span { display: inline-flex; align-items: center; gap: 6px; opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 12px; height: 3px; border-radius: 2px; }
.legend .sw--b { height: 10px; width: 10px; border-radius: 3px; }
.legend .sw--d { background: repeating-linear-gradient(90deg, var(--ref) 0 4px, transparent 4px 7px) !important; }
.legend .sw--h { background: repeating-linear-gradient(135deg, currentColor 0 2px, transparent 2px 4px) !important; border: 1px solid currentColor; }

.hb { display: flex; flex-direction: column; gap: 12px; }
.hb__r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.hb__l { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb__v { font-size: 13px; color: var(--ink-2); }
.hb__t { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hb__t i { display: block; height: 100%; border-radius: 99px; background: var(--s1); width: 0; transition: width 1s cubic-bezier(.2, .9, .2, 1); }

/* ranking */
.rk { width: 100%; border-collapse: collapse; }
.rk th { font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: right; padding: 0 8px 10px; white-space: nowrap; }
.rk th:first-child, .rk td:first-child { text-align: left; padding-left: 0; }
.rk td { padding: 11px 8px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk tbody tr { cursor: pointer; transition: background .15s; }
.rk tbody tr:hover { background: var(--surface-2); }
.rk__n { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rk__n b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.rk__n small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.rk .spark { width: 84px; }
@media (max-width: 1320px) { .rk .hide-md { display: none; } }
.ic-cat { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.spark { width: 96px; height: 30px; display: inline-block; vertical-align: middle; }
.spark path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.3s cubic-bezier(.3, .8, .2, 1); }
.tr { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 500; }
.tr svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.bar-y { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-y i { display: block; height: 6px; border-radius: 6px; background: var(--s1); width: 0; transition: width 1s cubic-bezier(.2, .9, .2, 1); }

/* alertas */
.al { display: flex; flex-direction: column; }
.al a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; }
.al a:first-child { border-top: 0; padding-top: 2px; }
.al b { font-weight: 500; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al__d { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; text-align: center; font-size: 10.5px; line-height: 1.1; font-weight: 600; }
.al__d b { font-size: 15px; display: block; }

/* ativos */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .sp { flex: 1; }
.inp { height: 38px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 11px; padding: 0 12px; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.inp { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8194' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
textarea.inp { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.search { position: relative; flex: 1 1 220px; max-width: 340px; }
.search .inp { width: 100%; padding-left: 36px; }
.search svg.i { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ac { padding: 18px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; text-decoration: none; transition: transform .25s, border-color .25s; animation: rise .5s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.ac:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ac__h { display: flex; gap: 12px; align-items: flex-start; }
.ac__h b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.ac__h small { color: var(--muted); font-size: 12.5px; }
.ac__v { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.ac__v strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ac__v .spark { width: 110px; height: 38px; }
.ac__m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ac__m span { font-size: 11.5px; color: var(--muted); display: block; }
.ac__m b { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ac--arch { opacity: .6; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* detalhe */
.det__h { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.det__h .sp { flex: 1; }
.det__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.tabs .badge { background: var(--surface-3); color: var(--ink-2); margin-left: 4px; }

/* tabelas */
.tbl-w { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .acts { white-space: nowrap; text-align: right; width: 1%; }
.tbl .acts .btn { opacity: .55; }
.tbl tr:hover .acts .btn { opacity: 1; }
.tbl td.wrap { max-width: 340px; }
.tbl td.wrap b { font-weight: 500; display: block; }
.tbl td.wrap small { color: var(--muted); }
.tbl tr.prev td { color: var(--ink-2); }
.tbl tr.prev td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.sum { display: flex; gap: 22px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sum div span { display: block; font-size: 12px; color: var(--muted); }
.sum div b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 20px; color: var(--muted); font-size: 13px; }

/* vazio */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg.i { width: 34px; height: 34px; stroke-width: 1.4; color: var(--muted); margin-bottom: 10px; }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.empty p { margin: 0 auto 18px; max-width: 460px; }
.welcome { padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; overflow: hidden; position: relative; }
.welcome h2 { font-size: 28px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; font-weight: 600; }
.welcome p { color: var(--ink-2); margin: 0 0 20px; }
.welcome .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: w; }
.welcome li { display: flex; gap: 12px; align-items: flex-start; counter-increment: w; font-size: 13.5px; color: var(--ink-2); }
.welcome li::before { content: counter(w); width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; }
.welcome li b { color: var(--ink); font-weight: 600; display: block; }

/* sociedades */
.tree { display: flex; flex-direction: column; gap: 10px; }
.tnode { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.tnode .sp { flex: 1; min-width: 0; }
.tnode b { font-weight: 600; display: block; }
.tnode small { color: var(--muted); }
.tchild { margin-left: 34px; position: relative; }
.tchild::before { content: ""; position: absolute; left: -20px; top: -10px; bottom: 50%; width: 14px; border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: 8px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7, 8, 12, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal__b { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); animation: pop .3s cubic-bezier(.2, .9, .2, 1); }
.modal__b--lg { width: min(900px, 100%); }
.modal__h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal__h h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; flex: 1; }
.modal__c { padding: 10px 22px 6px; }
.modal__f { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px 20px; flex-wrap: wrap; }
.modal__f .sp { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f--w { grid-column: 1 / -1; }
.f label, .f > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.f small { color: var(--muted); font-size: 12px; }
.f .inp { width: 100%; }
.f-sec { grid-column: 1 / -1; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.radio-row { display: flex; gap: 8px; }
.radio-row label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 11px; border: 1px solid var(--line-2); cursor: pointer; font-weight: 500; }
.radio-row input { position: absolute; opacity: 0; }
.radio-row input:checked + span { color: var(--accent); }
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 13px; cursor: pointer; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop b { color: var(--ink); }
.note { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.note--warn { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.secret { font: 600 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; padding: 14px; border-radius: 12px; background: var(--surface-3); text-align: center; user-select: all; }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .5); animation: pop .3s cubic-bezier(.2, .9, .2, 1); max-width: 380px; }
.toast--e { background: var(--neg); color: #fff; }

/* login */

/* relatório */
.rep { max-width: 980px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 44px 48px; }
.rep__h { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.rep__h h1 { font-size: 26px; letter-spacing: -.025em; margin: 6px 0 4px; font-weight: 600; }
.rep__h p { margin: 0; color: var(--ink-2); }
.rep__h .brand { color: var(--ink); }
.rep__meta { text-align: right; font-size: 12.5px; color: var(--muted); }
.rep h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; font-weight: 600; }
.rep__sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 24px; }
.rep__sum div { padding: 16px; border-left: 1px solid var(--line); }
.rep__sum div:first-child { border-left: 0; }
.rep__sum span { display: block; font-size: 12px; color: var(--muted); }
.rep__sum b { font-size: 19px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.rep__sum small { font-size: 12px; }
.rep .tbl th { background: transparent; position: static; }
.rep .tbl tfoot td { font-weight: 600; border-top: 2px solid var(--line-2); }
.rep__disc { margin-top: 30px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.rep__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.rep__sign div { border-top: 1px solid var(--ink-2); padding-top: 8px; font-size: 12.5px; color: var(--ink-2); text-align: center; }

.loading { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spin { width: 26px; height: 26px; border: 2.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- app instalado / PWA ---------- */
html { -webkit-tap-highlight-color: transparent; }
.is-app body { overscroll-behavior-y: none; }
.is-app .nav a, .is-app .mnav a, .is-app .btn, .is-app .seg button, .is-app .tabs button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.side { padding-top: calc(22px + env(safe-area-inset-top)); padding-left: calc(14px + env(safe-area-inset-left)); }
.install { display: flex; align-items: center; gap: 12px; margin: 14px 6px 0; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--side-line); background: rgba(255, 255, 255, .04); color: var(--side-ink); text-align: left; cursor: pointer; font: inherit; transition: background .2s, border-color .2s; }
.install:hover { background: rgba(109, 132, 255, .14); border-color: rgba(109, 132, 255, .4); }
.install svg.i { color: #8ea2ff; }
.install b { display: block; font-size: 13px; font-weight: 500; }
.install small { color: var(--side-muted); font-size: 11.5px; }
.netbar { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 300; background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); animation: pop .3s cubic-bezier(.2, .9, .2, 1); max-width: calc(100vw - 32px); text-align: center; }
.netbar.ok { background: var(--pos); color: #fff; }
.toast--upd { display: flex; align-items: center; gap: 14px; }
.toast--upd .btn { background: var(--bg); color: var(--ink); border-color: transparent; height: 30px; }
@media (pointer: coarse) {
  .inp, select.inp, textarea.inp { font-size: 16px; }
  .btn--sm { min-height: 36px; }
  .tbl .acts .btn { opacity: 1; }
}

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); flex-wrap: wrap; row-gap: 8px; }
  .top [data-ent] { order: 2; flex: 1; max-width: none !important; height: 34px; font-size: 13px; }
  .top [data-actions] { order: 3; }
  .top [data-actions] .btn span { display: none; }
  .top [data-actions] .btn { width: 34px; height: 34px; padding: 0; }
  .top__t { order: 4; flex-basis: 100%; }
  .top__mb { order: 1; margin-right: auto; }
  .top__mb { display: inline-flex; color: var(--ink); }
  .top__mb .brand__mk { font-size: 19px; }
  .view { padding: 4px max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .mnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mnav a, .mnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); text-decoration: none; padding: 6px 0; border: 0; background: none; font-weight: 500; position: relative; }
  .mnav a.on { color: var(--accent); }
  .mnav svg.i { width: 21px; height: 21px; }
  .mnav .badge { position: absolute; top: 0; left: calc(50% + 6px); height: 16px; min-width: 16px; font-size: 10px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px; }
  .kpi__v { font-size: 19px; }
  .welcome { grid-template-columns: 1fr; padding: 26px; }
  .rep { padding: 24px 18px; }
  .rep__sum { grid-template-columns: repeat(2, 1fr); }
  .rep__sum div:nth-child(3) { border-left: 0; }
  .rep__sum div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .rep__h { flex-direction: column; }
  .rep__meta { text-align: left; }
  .rk .hide-sm { display: none; }
  .modal { padding: 0; align-items: end; }
  .modal__b { border-radius: 20px 20px 0 0; max-height: calc(100dvh - 24px - env(safe-area-inset-top)); padding-bottom: env(safe-area-inset-bottom); }
  .toasts { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .kgrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .acards { grid-template-columns: 1fr; }
  .top__t h1 { font-size: 18px; }
  .card__h, .card__b { padding-left: 16px; padding-right: 16px; }
  .rk__n b { max-width: 150px; }
  .search { max-width: none; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- impressão (prestação de contas) ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --line: #ddd; color-scheme: light; }
  body { background: #fff; font-size: 11.5px; }
  .side, .top, .mnav, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; max-width: none; }
  .rep { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .rep h3 { break-after: avoid; }
  .tbl tr, .rep__sum, .chart { break-inside: avoid; }
  .tbl th { background: #fff; }
  @page { margin: 16mm 14mm; }
}

/* =========================================================
   Fotos, documentos, demonstração e tabelas em cards (v1.2)
   ========================================================= */
.mc-only { display: none; }
.thumb { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-3); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* card de ativo com foto */
.ac { padding: 0 0 16px; overflow: hidden; gap: 12px; }
.ac > .ac__h, .ac > .ac__v, .ac > .ac__m { margin: 0 18px; }
.ac__ph { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.ac__ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .9, .2, 1); }
.ac:hover .ac__ph img { transform: scale(1.04); }
.ac__ph--none { display: grid; place-items: center; color: var(--muted); background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); }
.ac__ph--none svg.i { width: 40px; height: 40px; opacity: .55; }
.ac__chips { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.ac__chips .chip { background: rgba(255, 255, 255, .92); color: #1d2230; backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ac__chips .chip--pos { color: #12804f; } .ac__chips .chip--warn { color: #a15c00; } .ac__chips .chip--acc { color: #3b4fd8; }
.ac__h b { font-size: 15.5px; }

/* foto no detalhe do ativo */
.det__hero { position: relative; height: clamp(180px, 30vw, 320px); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; background: var(--surface-3); border: 1px solid var(--line); }
.det__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.det__hero--none { height: 120px; display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--surface-3) 14px 28px); }
.det__hero-ic svg.i { width: 36px; height: 36px; opacity: .6; }
.det__hero-acts { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.det__hero-acts .btn { background: rgba(255, 255, 255, .94); color: #1d2230; border-color: transparent; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; }

/* documentos */
.dstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dstat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; min-width: 0; }
.dstat:hover { transform: translateY(-1px); border-color: var(--line-2); }
.dstat[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.dstat__i { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.dstat--neg .dstat__i { background: var(--neg-soft); color: var(--neg); }
.dstat--warn .dstat__i { background: var(--warn-soft); color: var(--warn); }
.dstat--pos .dstat__i { background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); }
.dstat__n { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dstat__l { font-size: 12.5px; color: var(--muted); line-height: 1.25; min-width: 0; }
.dl-card { padding: 4px 0; }
.dl { list-style: none; margin: 0; padding: 0; }
.dl__i { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.dl__i:first-child { border-top: 0; }
.dl__th { width: 56px; height: 76px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 14px -8px rgba(11, 13, 18, .35); transition: transform .2s; }
.dl__th:hover { transform: translateY(-2px) rotate(-1deg); }
.dl__th img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dl__th span { display: grid; place-items: center; gap: 2px; color: #7a8194; }
.dl__th small { font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.dl__th--none { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.dl__b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl__t { all: unset; cursor: pointer; font-weight: 600; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.dl__t:hover { color: var(--accent); }
.dl__t:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.dl__m { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted); }
.dl__s { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.dl__a { display: flex; gap: 2px; }
.pv { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.pv__doc { background: var(--surface-3); border-radius: 14px; padding: 14px; }
.pv__doc img { width: 100%; display: block; border-radius: 4px; background: #fff; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); }
.pv__meta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.pv__rows { display: grid; gap: 10px; width: 100%; }
.pv__rows div { display: grid; gap: 2px; }
.pv__rows span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pv__rows b { font-weight: 500; font-size: 14px; }
.pv__acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* demonstração */
.demobar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 9px max(20px, env(safe-area-inset-right)) 9px 28px; background: linear-gradient(90deg, #20286b, #3b2a7a); color: #eef0ff; font-size: 13px; }
.demobar__tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; letter-spacing: .02em; padding: 3px 10px 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.demobar__tag svg.i { width: 15px; height: 15px; }
.demobar__t { flex: 1 1 260px; color: rgba(238, 240, 255, .82); min-width: 0; }
.demobar__as { display: inline-flex; align-items: center; gap: 8px; }
.demobar__as span { color: rgba(238, 240, 255, .75); }
.demobar__as select { height: 32px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12); color: #fff; padding: 0 10px; font: inherit; max-width: 260px; }
.demobar__as select option { color: #111; }
.demobar__cta { color: #fff; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 9px; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.demobar__cta:hover { background: rgba(255, 255, 255, .26); }

@media (max-width: 900px) {
  .demobar { padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); font-size: 12.5px; }
  .demobar__t { display: none; }
  .demobar__as { flex: 1; min-width: 0; }
  .demobar__as span { display: none; }
  .demobar__as select { flex: 1; max-width: none; min-width: 0; width: 100%; }
  .demobar { flex-wrap: nowrap; }
  .demobar__tag { flex: none; }
  .is-demo .top { padding-top: 10px; }
  .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dstat { padding: 12px; column-gap: 10px; }
  .dstat__i { width: 34px; height: 34px; }
  .dstat__n { font-size: 20px; }
  .pv { grid-template-columns: 1fr; }
  .pv__doc { padding: 10px; }
}
@media (max-width: 560px) {
  .demobar__cta { display: none; }
  .dl__i { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 14px 16px; align-items: start; }
  .dl__th { width: 48px; height: 66px; }
  .dl__a { grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; }
  .dl__a .btn { opacity: 1; }
  .det__hero { border-radius: 14px; }
}

/* tabelas viram cards (sem rolagem lateral) */
@media (max-width: 760px) {
  .mc-only { display: block; }
  .tbl-w:has(> table.mc) { overflow: visible; }
  table.mc, table.mc tbody, table.mc tfoot { display: block; width: 100%; }
  table.mc thead { display: none; }
  table.mc tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: none; }
  table.mc tbody tr:hover { background: none; }
  table.mc tr:last-child { border-bottom: 0; }
  table.mc td { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: 1 1 100%; order: 6; padding: 0; border: 0; text-align: right; min-width: 0; font-size: 13px; max-width: none; white-space: normal; }
  table.mc td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
  table.mc td:empty, table.mc .hide-sm, table.mc .hide-mc { display: none; }
  table.mc td.c-main { flex: 1 1 0; display: block; text-align: left; order: 1; min-width: 55%; }
  table.mc td.c-main b { display: block; font-weight: 600; font-size: 14px; }
  table.mc td.c-main small { display: block; color: var(--muted); font-size: 12px; }
  table.mc td.c-amt { flex: 0 0 auto; order: 2; font-weight: 650; font-size: 15px; justify-content: flex-end; }
  table.mc td.c-meta { flex: 0 0 auto; order: 3; justify-content: flex-start; color: var(--muted); font-size: 12.5px; }
  table.mc td.c-note { order: 4; justify-content: flex-start; text-align: left; color: var(--muted); }
  table.mc td.c-acts { order: 5; flex: 1 1 auto; justify-content: flex-end; margin: -4px -6px -4px auto; }
  table.mc td.c-acts .btn { width: 34px; height: 34px; }
  table.mc tfoot td { border: 0 !important; }
  table.mc td.c-note:has(small:empty) { display: none; }
  table.mc td.c-chk { order: 0; flex: 0 0 auto; }
  table.mc td.c-main::before, table.mc td.c-amt::before, table.mc td.c-meta::before, table.mc td.c-note::before, table.mc td.c-acts::before, table.mc td.c-chk::before { content: none; }
  table.mc td.c-meta br { display: none; }
  table.mc td.c-meta .chip { height: 22px; }
  table.mc tr.prev td:first-child { box-shadow: none; }
  table.mc tr.prev { box-shadow: inset 3px 0 0 var(--warn); }
  table.mc tfoot tr { background: var(--surface-2); font-weight: 600; }
  table.mc td > * { min-width: 0; }
  /* ranking do painel */
  table.rk.mc tr { padding: 13px 0; cursor: pointer; }
  table.rk.mc td { padding: 0; border: 0; }
  table.rk.mc td.c-main .rk__n b, table.rk.mc td.c-main .rk__n small { max-width: none; white-space: normal; }
  table.rk.mc td.c-main .rk__n { gap: 12px; }
  table.rk.mc .thumb, table.rk.mc .ic-cat { width: 44px; height: 44px; }
  .rep .tbl.mc tr { padding: 10px 0; }
}


/* ---------- login (minimalista) ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; justify-items: center; background: var(--bg); padding: calc(24px + env(safe-area-inset-top)) 22px calc(20px + env(safe-area-inset-bottom)); }
.login__box { align-self: center; width: 100%; max-width: 360px; }
.login__brand { display: inline-block; color: var(--ink); text-decoration: none; font-size: 26px; margin-bottom: 40px; }
.login h1 { font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 6px; }
.login__sub { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login .f label { font-size: 13px; }
.login .inp { height: 46px; background: var(--surface); }
.login .btn--p { height: 46px; font-size: 15px; margin-top: 4px; }
.login__err { color: var(--neg); font-size: 13.5px; min-height: 0; }
.login__err:empty { display: none; }
.login__alt { margin: 26px 0 0; font-size: 14px; color: var(--muted); }
.login__link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: none; }
.login__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.login__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.login [data-install] { margin-top: 18px; width: 100%; }
.login__foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding-top: 28px; }
.login__foot a { color: var(--ink-2); text-decoration: none; }
.login__foot a:hover { color: var(--ink); }
