:root {
  --bg: #0a0b0d;
  --panel: #111316;
  --panel-2: #181b1f;
  --line: #22262c;
  --line-2: #2c3138;
  --text: #e8eaed;
  --muted: #8b939d;
  --faint: #5d646d;
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, .12);
  --red: #ef7f7f;
  --red-dim: rgba(239, 127, 127, .12);
  --amber: #e8b25c;
  --amber-dim: rgba(232, 178, 92, .12);
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.num, .amount, .value, td { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; position: fixed; inset: 0 auto 0 0; z-index: 30;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 20px 12px; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; stroke: #04130c; stroke-width: 2.6; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: 10px; color: var(--muted); font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--panel-2); }
.nav a.active svg { color: var(--green); }
.install-btn { margin-top: auto; justify-content: center; }
.install-btn[hidden] { display: none; }
.install-btn:not([hidden]) + .sidebar-foot { margin-top: 0; }
.sidebar-foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.sidebar-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.backdrop { display: none; }

.main { margin-left: 236px; flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn.menu-btn { display: none; }
.month-nav { display: flex; align-items: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.month-label { background: none; border: 0; padding: 6px 10px; font-weight: 600; min-width: 168px; border-radius: 8px; }
.month-label:hover { background: var(--panel-2); }
.month-label:not(.is-current)::after { content: "•"; color: var(--amber); margin-left: 6px; }
.view { padding: 24px 28px 110px; max-width: 1240px; }

/* ---------- Generic ---------- */
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; background: none; border: 0; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.del:hover { color: var(--red); }

.btn {
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); font-weight: 550; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #3a4048; }
.btn.primary { background: var(--green); color: #04130c; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red-dim); color: var(--red); border-color: rgba(239, 127, 127, .25); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card + .card, .card + .grid-2, .grid-2 + .card, .grid-2 + .grid-2, .cards + .card, .cards + .grid-2, .toolbar + .cards { margin-top: 14px; }
.cards > .card, .grid-2 > .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.link { color: var(--green); font-size: 13px; font-weight: 500; background: none; border: 0; padding: 0; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.warn { color: var(--amber); }
.muted { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .label i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stat .value { font-size: 26px; font-weight: 620; letter-spacing: -.02em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub { font-size: 12px; color: var(--faint); margin-top: 4px; }
.stat.highlight { background: linear-gradient(180deg, rgba(52, 211, 153, .07), transparent 70%), var(--panel); border-color: rgba(52, 211, 153, .22); }

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

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.summary { display: flex; gap: 32px; flex-wrap: wrap; }
.summary .s-label { font-size: 12px; color: var(--muted); }
.summary .s-value { font-size: 20px; font-weight: 620; letter-spacing: -.01em; }

.alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--red-dim); border: 1px solid rgba(239, 127, 127, .22); color: #f3b3b3; margin-bottom: 14px; font-size: 13.5px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row:last-child { padding-bottom: 2px; }
.date-lead { width: 42px; height: 42px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.date-lead b { font-size: 15px; font-weight: 620; }
.date-lead span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date-lead.vencida { border-color: rgba(239, 127, 127, .35); background: var(--red-dim); }
.date-lead.vencida b { color: var(--red); }
.date-lead.pago b { color: var(--muted); }
.row-title { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta .neg, .row-meta .warn { font-weight: 500; }
.row-end { display: flex; align-items: center; gap: 10px; }
.amount { font-weight: 620; white-space: nowrap; min-width: 96px; text-align: right; }
.row.is-paid .amount { color: var(--muted); }
.actions { display: flex; gap: 0; }

.badge { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: 1px; }

.pill { font-size: 12px; font-weight: 550; padding: 0 11px; height: 28px; border-radius: 99px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; stroke-width: 2.4; }
.pill.pago { color: var(--green); background: var(--green-dim); }
.pill.pago:hover { border-color: rgba(52, 211, 153, .35); }
.pill.pagar { color: var(--text); background: var(--panel-2); border-color: var(--line-2); }
.pill.pagar:hover { border-color: var(--green); color: var(--green); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip b { color: var(--text); font-weight: 600; }

.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--panel-2); color: var(--text); }
.tabs button span { color: var(--faint); margin-left: 4px; }

.empty { text-align: center; padding: 36px 16px; }
.empty .e-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); display: inline-grid; place-items: center; color: var(--muted); margin-bottom: 12px; }
.empty .e-icon svg { width: 22px; height: 22px; }
.empty h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.empty p { margin: 0 auto 16px; color: var(--muted); max-width: 440px; font-size: 13.5px; }
.empty .e-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.empty.compact { padding: 22px 10px; }
.empty.compact p { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: right; color: var(--muted); font-weight: 500; font-size: 12px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }
tr.active td { background: rgba(52, 211, 153, .06); }
tr.active td:first-child { box-shadow: inset 2px 0 0 var(--green); padding-left: 10px; }
td.strong { font-weight: 600; }

/* ---------- Metrics (visão mensal) ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.metric { background: var(--panel); padding: 16px; }
.metric .label { font-size: 12.5px; color: var(--muted); }
.metric .value { font-size: 20px; font-weight: 620; margin-top: 4px; letter-spacing: -.01em; white-space: nowrap; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--faint); font-size: 11px; stroke: none; font-family: inherit; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .hit { fill: transparent; stroke: none; }
.bar-grp:hover .hit { fill: rgba(255, 255, 255, .035); }
.chart rect, .chart circle.pt { stroke: none; }
.pt-hit { fill: transparent; stroke: none; cursor: pointer; }
.pt-grp:hover .pt { r: 6; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.donut-wrap { display: flex; gap: 22px 26px; align-items: center; flex-wrap: wrap; justify-content: center; }
.donut { flex: none; }
.donut .seg { cursor: pointer; }
.donut .seg:hover { stroke-width: 30; }
.donut .d-total { fill: var(--text); font-size: 16px; font-weight: 650; stroke: none; }
.donut .d-sub { fill: var(--muted); font-size: 11px; stroke: none; }
.dist { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dist-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 13px; cursor: default; }
.dist-item i { width: 10px; height: 10px; border-radius: 3px; }
.dist-item .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-item .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.dist-item .p { color: var(--muted); width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.dist-bar { grid-column: 2 / -1; height: 3px; background: var(--panel-2); border-radius: 2px; overflow: hidden; margin-top: -6px; }
.dist-bar b { display: block; height: 100%; border-radius: 2px; }

.kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }
.kpis .s-label { font-size: 12px; color: var(--muted); }
.kpis .s-value { font-size: 18px; font-weight: 620; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.note b { color: var(--text); font-weight: 600; }

/* ---------- Tooltip / Toast ---------- */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; display: none;
  background: #1d2126; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 8px 11px; font-size: 12.5px; line-height: 1.55; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  max-width: 260px; font-variant-numeric: tabular-nums;
}
.tooltip.show { display: block; }
.tooltip b { font-weight: 600; }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 16px; }
.tooltip .t-row span:first-child { color: var(--muted); }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120;
  background: #1d2126; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 16px;
  font-size: 13.5px; display: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px);
}
.toast.show { display: block; }

/* ---------- Modal / Forms ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .62); display: grid; place-items: center; padding: 16px; }
.modal.hidden { display: none; }
.modal-card { width: 100%; max-width: 500px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px 22px 22px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-msg { color: var(--muted); margin: -4px 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.field.half { grid-column: auto; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea, .input {
  width: 100%; height: 42px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--text); padding: 0 12px; font: inherit; outline: none;
}
.field textarea, textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--green); }
.money { position: relative; }
.money em { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
.money input { padding-left: 38px; font-variant-numeric: tabular-nums; }
.check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.form-error { color: var(--red); font-size: 13px; margin: 12px 0 0; }

.settings { display: grid; gap: 14px; max-width: 760px; }
.settings .card p { color: var(--muted); margin: 0 0 14px; font-size: 13.5px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form .money { width: 220px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cat-grid label { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.cat-grid textarea { min-height: 200px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .5); }
  .main { margin-left: 0; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 10px 14px; gap: 8px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar h1 { font-size: 16px; }
  .month-label { min-width: 0; padding: 6px 6px; font-size: 13px; }
  .view { padding: 16px 14px 110px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-grid textarea { min-height: 120px; }
}
@media (max-width: 600px) {
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .stat .value { font-size: 19px; }
  .stat .label { font-size: 12px; }
  .stat .sub { font-size: 11px; }
  .summary { gap: 20px; }
  .summary .s-value { font-size: 17px; }
  .row { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .row-end { grid-column: 2; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
  .amount { min-width: 0; text-align: left; margin-right: auto; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field.half { grid-column: 1 / -1; }
  .modal { place-items: end center; padding: 0; }
  .modal-card { border-radius: 16px 16px 0 0; max-height: 92vh; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .metric .value { font-size: 17px; }
  .toolbar .btn.primary { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .topbar h1 { display: none; }
  .month-nav { margin-left: auto; }
}

/* ---------- Assistente ---------- */
.fab {
  position: fixed; right: 22px; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--green); color: #04130c;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.fab svg { width: 24px; height: 24px; stroke-width: 2.1; }
.fab:hover { filter: brightness(1.07); }
.ai-title-ic { width: 18px; height: 18px; color: var(--green); vertical-align: -3px; margin-right: 4px; }
.ai-hint { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }
.ai-input { display: flex; gap: 8px; align-items: flex-end; }
.ai-input textarea {
  flex: 1; min-width: 0; min-height: 50px; max-height: 140px; resize: vertical; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px; font: inherit; outline: none;
}
.ai-input textarea:focus { border-color: var(--green); }
.mic-btn { width: 50px; height: 50px; flex: none; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); display: grid; place-items: center; color: var(--text); }
.mic-btn svg { width: 21px; height: 21px; }
.mic-btn:hover { border-color: #3a4048; }
.mic-btn.on { background: var(--red); border-color: var(--red); color: #1a0505; }
.mic-btn.send { background: var(--green); border-color: transparent; color: #04130c; }
.ai-msg { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.ai-msg.neg { background: var(--red-dim); border-color: rgba(239, 127, 127, .25); color: #f3b3b3; }
.ai-msg.muted { color: var(--muted); }
.ai-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ai-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 10px 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.ai-card .amount { min-width: 0; }
.ai-tag { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
@media (max-width: 600px) {
  .fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .ai-card { grid-template-columns: minmax(0, 1fr) auto; }
  .ai-card .amount { grid-column: 1; grid-row: 2; text-align: left; }
  .ai-card .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Parcelas ---------- */
.field.hide { display: none; }
.badge.parc { color: #b9c7ff; border-color: rgba(91, 141, 239, .35); background: rgba(91, 141, 239, .12); }
.parc-list { display: flex; flex-direction: column; }
.parc-row { padding: 14px 0; border-top: 1px solid var(--line); }
.parc-row:first-child { border-top: 0; padding-top: 2px; }
.parc-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.parc-val { text-align: right; white-space: nowrap; }
.parc-val b { display: block; font-weight: 620; }
.parc-val span { font-size: 12px; color: var(--muted); }
.parc-row .dist-bar { margin: 10px 0 8px; height: 5px; }
.parc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.parc-foot b { color: var(--text); font-weight: 600; }

/* ---------- Seletor Dia / Semana / Mês ---------- */
.view-tabs[hidden] { display: none; }
.view-tabs button { padding: 6px 14px; }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .view-tabs { order: 3; width: 100%; display: flex; }
  .view-tabs[hidden] { display: none; }
  .view-tabs button { flex: 1; }
}
