:root {
  /* Canais no donut: paleta categórica validada (vizinhos, modo claro); ordem fixa em origins.js */
  --ch-1: #008300; --ch-2: #2a78d6; --ch-3: #1baf7a; --ch-4: #eb6834;
  --ch-5: #4a3aa7; --ch-6: #eda100; --ch-7: #e87ba4; --ch-other: #9aa2ad;
  --ink: #1b2430;
  --muted: #697381;
  --subtle: #9aa2ad;
  --line: #e8ebef;
  --surface: #ffffff;
  --canvas: #f5f6f7;
  --nav: #242729;
  --orange: #4fbd48;
  --orange-deep: #319b35;
  --orange-soft: #eef8ed;
  --green: #319b55;
  --green-soft: #eaf7ee;
  --red: #c84a52;
  --red-soft: #fdf0f1;
  --blue: #3977d5;
  --amber: #d99a1e;
  --amber-soft: #fdf7ea;
  --shadow: 0 10px 30px rgba(18, 31, 45, 0.055);
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, select { font: inherit; }
button { cursor: pointer; }

.sidebar {
  width: 244px; height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 20;
  display: flex; flex-direction: column; padding: 30px 18px 20px; background: var(--nav); color: #fff;
}
.brand { display: flex; align-items: center; margin: 4px 8px 32px; text-decoration: none; }
.brand img { display: block; width: 100%; height: auto; }
.main-nav { display: grid; gap: 7px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 9px;
  color: #9ea9b5; text-decoration: none; font-weight: 600; font-size: 14px; transition: .2s ease;
}
.nav-item[hidden] { display: none; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: rgba(79,189,72,.16); }
.nav-icon { width: 20px; color: currentColor; font-size: 19px; text-align: center; }
.sidebar-footer { display: grid; gap: 14px; margin-top: auto; }
.connection-card { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid #2d3a46; border-radius: 10px; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #27c082; box-shadow: 0 0 0 4px rgba(39,192,130,.12); transition: background .3s ease, box-shadow .3s ease; }
.status-dot[data-state="stale"] { background: #e3a008; box-shadow: 0 0 0 4px rgba(227,160,8,.14); }
.status-dot[data-state="error"] { background: #e5484d; box-shadow: 0 0 0 4px rgba(229,72,77,.16); }
.status-dot[data-state="off"] { background: #6b7682; box-shadow: none; }
.api-health { display: grid; gap: 10px; }
.api-health-head { display: flex; align-items: center; gap: 10px; }
.api-health-list { display: grid; gap: 5px; margin: 0; padding: 0 0 0 2px; list-style: none; }
.api-health-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: #9ea9b5; font-size: 10px; }
.api-health-list .status-dot { width: 6px; height: 6px; box-shadow: none; }
.api-health-list small { margin: 0; color: #7f8a95; font-variant-numeric: tabular-nums; }
.api-health-list li[data-state="error"] small { color: #f08a8d; }.api-health-list li[data-state="stale"] small { color: #e9b949; }
.connection-card strong, .connection-card small { display: block; }
.connection-card strong { font-size: 11px; color: #dbe1e6; }
.connection-card small { margin-top: 3px; font-size: 10px; color: #7f8a95; }
.user-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; border: 0; padding: 10px; color: #fff; background: transparent; text-align: left; }
.user-card .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: #344352; font-size: 11px; font-weight: 700; }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: 11px; }.user-card small { margin-top: 2px; color: #7f8a95; font-size: 10px; }
.user-card > span:nth-child(2) { min-width: 0; }.user-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card { border-radius: 10px; transition: background .2s ease; }.user-card:hover { background: rgba(255,255,255,.05); }.user-card:hover small { color: #fff; }

.page-shell { margin-left: 244px; min-height: 100vh; }
.topbar {
  height: 92px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
}
.topbar h1 { margin: 4px 0 0; font: 700 23px/1.1 Manrope, sans-serif; }
.eyebrow { margin: 0; color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.last-update { color: var(--subtle); font-size: 11px; }
.icon-button, .menu-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; }
.menu-button { display: none; }
.dashboard { max-width: 1500px; margin: 0 auto; padding: 26px 36px 60px; }
.filters { display: flex; align-items: end; gap: 12px; margin-bottom: 34px; }
.filter-group { display: grid; gap: 7px; }
.filter-group label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.filter-group select { min-width: 174px; padding: 10px 36px 10px 12px; border: 1px solid #dfe3e7; border-radius: 8px; outline: none; color: var(--ink); background: #fff; font-size: 12px; }
.campaign-filter select { min-width: 210px; }
.filter-group select:focus, .date-pair input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.custom-range[hidden] { display: none; }
.date-pair { display: flex; gap: 6px; }
.date-pair input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #dfe3e7; border-radius: 8px; outline: none; color: var(--ink); background: #fff; font: inherit; font-size: 12px; }
.filter-context { display: flex; align-items: center; gap: 13px; margin: 0 0 10px auto; color: var(--muted); font-size: 11px; }
.comparison { color: var(--green); }
.dashboard-section { scroll-margin-top: 112px; margin-bottom: 36px; }
.section-heading, .panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2, .panel-header h2 { margin: 5px 0 0; font: 700 17px/1.2 Manrope, sans-serif; }
.source-pill { padding: 6px 9px; border: 1px solid #cfe9cc; border-radius: 99px; color: var(--orange-deep); background: var(--orange-soft); font-size: 10px; font-weight: 700; }
.source-pill.muted { border-color: var(--line); color: var(--muted); background: #fff; }
.origin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.origin-card { padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.origin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.origin-identity { display: flex; align-items: center; gap: 9px; font: 700 13px/1 Manrope, sans-serif; }
.origin-logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; background: var(--ch-other); font-size: 11px; font-weight: 800; }
/* Mesma cor do canal no donut; fundos claros (água, amarelo, magenta) levam a letra escura para manter contraste. */
.origin-card[data-source="venda_assistida"] .origin-logo { background: var(--ch-1); }.origin-card[data-source="google_ads"] .origin-logo { background: var(--ch-2); }
.origin-card[data-source="organico"] .origin-logo { background: var(--ch-3); color: var(--ink); }.origin-card[data-source="direto"] .origin-logo { background: var(--ch-4); }
.origin-card[data-source="meta_ads"] .origin-logo { background: var(--ch-5); }.origin-card[data-source="referencia"] .origin-logo { background: var(--ch-6); color: var(--ink); }
.origin-card[data-source="social"] .origin-logo { background: var(--ch-7); color: var(--ink); }
.origin-share { color: var(--muted); font-size: 10px; }.origin-share strong { color: var(--ink); }
.origin-primary { margin: 20px 0 15px; }.origin-primary span { display: block; color: var(--muted); font-size: 10px; }.origin-primary strong { display: block; margin-top: 5px; font: 700 23px/1 Manrope; }
.origin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 13px; border-top: 1px solid var(--line); }.origin-stats span { display: block; color: var(--subtle); font-size: 9px; }.origin-stats strong { display: block; margin-top: 4px; font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metric-card { min-height: 132px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--orange-deep); background: var(--orange-soft); font-size: 13px; font-weight: 700; }
.metric-value { margin: 16px 0 8px; font: 700 24px/1 Manrope, sans-serif; letter-spacing: -.025em; }
.metric-bottom { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--subtle); }
.trend { padding: 3px 6px; border-radius: 5px; font-weight: 700; }
.trend.up { color: var(--green); background: var(--green-soft); }.trend.down { color: var(--red); background: var(--red-soft); }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, .8fr); gap: 12px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.chart-panel, .efficiency-panel, .funnel-panel, .mix-panel { padding: 20px; }
.legend { display: flex; gap: 17px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--orange); }.legend-swatch.spend { background: #66717e; }
.bar-chart { margin-top: 16px; }
.bar-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #edf0f2; stroke-width: 1; }.chart-label { fill: #9aa2ad; font-size: 9px; }
.bar { transition: opacity .15s ease; }.bar:hover { opacity: .78; }.bar.revenue { fill: var(--orange); }.bar.spend { fill: #66717e; }
.bar-label { fill: var(--ink); font-size: 10px; font-weight: 700; }
.efficiency-score { display: grid; place-items: center; width: 132px; height: 132px; margin: 28px auto 25px; border-radius: 50%; background: conic-gradient(var(--orange) var(--score), #edf0f2 0); position: relative; }
.efficiency-score::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.score-value { position: relative; z-index: 1; text-align: center; }.score-value strong { display: block; font: 800 30px/1 Manrope; }.score-value small { color: var(--muted); font-size: 9px; }
.health-list { display: grid; gap: 12px; }.health-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 11px; }.health-row span:first-child { color: var(--muted); }.health-row strong { font-weight: 700; }
.health-track { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 8px; background: #edf0f2; }.health-track i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--orange); }

.funnel-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .7fr); gap: 12px; }
.funnel-chart { display: grid; gap: 8px; }
.funnel-step { display: grid; grid-template-columns: 120px minmax(90px, 1fr) 70px; align-items: center; gap: 14px; }
.funnel-name { color: var(--muted); font-size: 11px; }.funnel-name strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 12px; }
.funnel-bar-wrap { height: 38px; border-radius: 7px; background: #f5f6f7; overflow: hidden; }.funnel-bar { display: flex; align-items: center; height: 100%; min-width: 45px; padding-left: 12px; border-radius: 7px; color: #fff; background: linear-gradient(90deg, var(--orange-deep), var(--orange)); font-size: 10px; font-weight: 700; transition: width .4s ease; }
.funnel-rate { color: var(--muted); text-align: right; font-size: 10px; }.funnel-rate strong { display: block; color: var(--ink); font-size: 12px; }
.abandonment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.abandonment-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.stage-label > span { display: block; color: var(--subtle); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.stage-label > strong { display: block; margin-top: 5px; font: 700 11px/1.25 Manrope; }
.stage-rate { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }.stage-rate strong { font: 700 22px/1 Manrope; }.stage-rate span { color: var(--green); font-size: 9px; font-weight: 700; }
.stage-progress { height: 5px; margin: 10px 0; overflow: hidden; border-radius: 8px; background: #edf0f2; }.stage-progress i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--green); }
.abandonment-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }.abandonment-card p b { color: var(--ink); }.abandonment-card small { display: block; margin-top: 5px; color: var(--red); font-size: 8px; }
.abandonment-card.total, .origin-card.selected { border-color: #cfe9cc; background: var(--orange-soft); }.abandonment-card.total .stage-progress i { background: var(--orange); }.abandonment-card.total .stage-rate span { color: var(--orange-deep); }

.text-button { border: 0; color: var(--orange-deep); background: transparent; font-size: 11px; font-weight: 700; }
.table-panel { overflow: hidden; }.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 13px 16px; color: var(--subtle); background: #fafafa; text-align: right; text-transform: uppercase; letter-spacing: .06em; font-size: 9px; }
th:first-child, th:nth-child(2), th:nth-child(3), td:first-child, td:nth-child(2), td:nth-child(3) { text-align: left; }
td { padding: 16px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.campaign-name { min-width: 210px; font-weight: 700; }.campaign-name small { display: block; margin-top: 4px; color: var(--subtle); font-weight: 400; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }.status-badge::before { content:""; width: 5px; height: 5px; border-radius:50%; background: currentColor; }
.source-badge { display: inline-block; padding: 4px 7px; border-radius: 6px; color: #275ea8; background: #edf4ff; font-size: 9px; font-weight: 700; }.source-badge.meta_ads { color: #4f46c8; background: #f0efff; }
.status-badge.paused { color: var(--muted); background: var(--canvas); }
.roas-cell { color: var(--green); font-weight: 700; }
.empty-state { padding: 36px; color: var(--muted); text-align: center; }

.status-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr); gap: 12px; }
.status-panel { padding: 22px; }
.status-total strong { display: block; font: 800 34px/1 Manrope; }.status-total span { color: var(--muted); font-size: 10px; }
.status-bar { display: flex; height: 14px; margin: 20px 0 16px; overflow: hidden; border-radius: 99px; background: #edf0f2; gap: 2px; }
.status-bar i { width: var(--share); min-width: 3px; background: var(--status-color); transition: width .4s ease; }
.status-legend { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.status-legend li { display: grid; grid-template-columns: 1fr auto 52px; align-items: center; gap: 10px; font-size: 11px; }
.status-legend li span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.status-legend li span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--status-color); }
.status-legend em { color: var(--subtle); font-style: normal; text-align: right; }
[data-status="pago"] { --status-color: var(--green); }
[data-status="aguardando"] { --status-color: var(--amber); }
[data-status="cancelado"] { --status-color: var(--red); }
[data-status="falhou"] { --status-color: #e3878d; }
[data-status="reembolsado"] { --status-color: #7d6bd6; }
[data-status="outros"] { --status-color: var(--subtle); }
.status-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.status-kpi { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.status-kpi > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.status-kpi > strong { margin-top: 8px; font: 700 24px/1 Manrope; }
.status-kpi p { margin: auto 0 0; padding-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.45; }.status-kpi p b { color: var(--ink); }
.status-kpi.attention { border-color: #f1dcae; background: var(--amber-soft); }.status-kpi.attention > strong { color: #9a6a0c; }
.status-kpi.loss > strong { color: var(--red); }
.status-delta { margin-top: 7px; color: var(--muted); font-size: 9px; font-weight: 700; }.status-delta.good { color: var(--green); }.status-delta.bad { color: var(--red); }
.status-empty { grid-column: 1 / -1; margin: 0; padding: 28px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-size: 11px; text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 12px 16px; border-radius: 9px; color: #fff; background: var(--nav); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .22s ease; }.toast.visible { opacity: 1; transform: translateY(0); }

.mix-panel { margin-bottom: 12px; }
.mix-body { display: grid; grid-template-columns: 200px minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; margin-top: 10px; }
.donut { display: block; width: 180px; height: 180px; margin: auto; }
.donut-seg { fill: none; stroke-width: 26; transition: opacity .2s ease; }.donut-seg:hover { opacity: .82; }.donut-seg.dim { opacity: .22; }
.donut-total { text-anchor: middle; font: 800 19px Manrope, sans-serif; fill: var(--ink); }.donut-caption { text-anchor: middle; font-size: 9px; fill: var(--muted); }
.mix-legend { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.mix-legend li { display: grid; grid-template-columns: 1fr auto 58px; align-items: center; gap: 14px; font-size: 12px; transition: opacity .2s ease; }
.mix-legend li.dim { opacity: .45; }
.mix-legend span { display: flex; align-items: center; gap: 8px; color: var(--ink); }.mix-legend i { width: 10px; height: 10px; border-radius: 2px; }
.mix-legend strong { font-weight: 700; }.mix-legend em { color: var(--muted); font-style: normal; text-align: right; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f6f7f8; }
.segmented button { padding: 6px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; transition: .15s ease; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.segmented button:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.mix-notes { align-self: stretch; padding: 14px 16px; border-left: 1px solid var(--line); }
.mix-notes-title { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.mix-notes dl { display: grid; gap: 8px; margin: 0; }
.mix-notes dt { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.mix-notes dt i { width: 8px; height: 8px; border-radius: 2px; }
.mix-notes dd { margin: 2px 0 0 15px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.mix-notes-foot { margin: 12px 0 0; color: var(--subtle); font-size: 10px; }
@media (max-width: 1100px) { .mix-body { grid-template-columns: 200px minmax(0, 1fr); } .mix-notes { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; } }
@media (max-width: 760px) { .mix-body { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .origin-grid { grid-template-columns: 1fr; }
  .analytics-grid, .funnel-layout, .status-layout { grid-template-columns: 1fr; }
  .efficiency-panel #efficiency-content { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 24px; }.efficiency-score { margin: 24px auto; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 10px 0 35px rgba(0,0,0,.18); }.sidebar.open { transform: translateX(0); }
  .page-shell { margin-left: 0; }.menu-button { display: block; }.topbar { height: 76px; padding: 0 18px; }.topbar h1 { font-size: 19px; }.last-update { display: none; }
  .dashboard { padding: 20px 16px 45px; }.filters { align-items: stretch; flex-wrap: wrap; }.filter-group { flex: 1 1 145px; }.filter-group select { width: 100%; min-width: 0; }.filter-context { width: 100%; margin: 5px 0 0; justify-content: space-between; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.metric-card { min-height: 122px; padding: 14px; }.metric-value { font-size: 20px; }
  .section-heading { align-items: center; }.source-pill { display: none; }.panel-header { flex-direction: column; }
  .funnel-step { grid-template-columns: 86px minmax(70px,1fr) 53px; gap: 8px; }.funnel-bar { padding-left: 7px; }.abandonment-grid { grid-template-columns: 1fr 1fr; }
  .efficiency-panel #efficiency-content { display: block; }
}
@media (max-width: 440px) {
  .metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 112px; }.abandonment-grid, .status-kpis { grid-template-columns: 1fr; }.comparison { display: none; }.dashboard { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

.coverage-note { margin: 0 0 18px; padding: 12px 16px; border: 1px solid #f1dcae; border-left: 4px solid var(--amber); border-radius: 10px; color: #6b4e12; background: var(--amber-soft); font-size: 11px; line-height: 1.5; }
.coverage-note strong { color: #4f390c; }


.ranking-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ranking-panel { padding: 20px; }
.ranking-list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.ranking-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.ranking-position { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--muted); background: var(--canvas); font: 700 11px/1 Manrope; }
.ranking-list li:first-child .ranking-position { color: #fff; background: var(--orange-deep); }
.ranking-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.ranking-line strong { font-weight: 700; }.ranking-line span { font-weight: 700; white-space: nowrap; }
.ranking-bar { height: 5px; margin: 6px 0 5px; overflow: hidden; border-radius: 8px; background: #edf0f2; }
.ranking-bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--orange); }
.ranking-list small { color: var(--muted); font-size: 9px; }
@media (max-width: 1100px) { .ranking-layout { grid-template-columns: 1fr; } }

/* Login: faixa escura da marca (mesma cor da sidebar) + cartão do formulário sobre o canvas. */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-shell { display: grid; grid-template-columns: 1.05fr 1fr; width: min(880px, 100%); overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: 0 30px 70px rgba(18, 31, 45, .12); }
.login-brand { position: relative; display: grid; place-items: center; min-height: 440px; padding: 36px; overflow: hidden; color: #fff; background: var(--nav); }
.login-brand::before { content: ""; position: absolute; inset: auto -30% -45% auto; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(79,189,72,.32), transparent 65%); }
.login-brand .brand { position: relative; width: 221px; margin: 0; }
.login-card { display: grid; align-content: center; gap: 8px; padding: 44px 40px; }
.login-card h1 { margin: 6px 0 18px; font: 700 23px/1.1 Manrope, sans-serif; }
.login-card label { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--canvas); font: inherit; font-size: 15px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.login-card input:hover { border-color: #d3d8de; }
.login-card input:focus { outline: none; border-color: var(--orange); background: var(--surface); box-shadow: 0 0 0 4px var(--orange-soft); }
.login-error { margin: 6px 0 0; padding: 10px 12px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 13px; font-weight: 600; }
.login-error[hidden] { display: none; }
.login-submit { margin-top: 14px; padding: 13px; border: 0; border-radius: 10px; color: #fff; background: var(--orange-deep); font-weight: 700; font-size: 15px; transition: background .2s ease, transform .1s ease; }
.login-submit:hover { background: #2a8a2e; }
.login-submit:active { transform: translateY(1px); }
.login-submit:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 2px; }
.login-submit:disabled { opacity: .7; cursor: progress; }
.login-help { margin-top: 6px; color: var(--subtle); font-size: 11px; text-align: center; }
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 0; padding: 40px 24px; }
  .login-brand .brand { width: 182px; }
  .login-card { padding: 28px 24px 32px; }
}
