:root {
  --navy: #0d1628;
  --navy-2: #16223a;
  --navy-3: #1f2d49;
  --nav-text: #b7c0d2;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e4e8f0;
  --line-2: #eef1f6;
  --text: #0f1b33;
  --muted: #69758c;
  --faint: #a3adbf;
  --green: #17a34a;
  --red: #e5484d;
  --blue: #2563eb;
  --amber: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 51, 0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; background: var(--navy); color: var(--nav-text);
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 24px; color: #fff; padding: 0 12px 22px; font-weight: 500; }
.brand b { font-weight: 700; margin-right: -8px; }
.brand-dark { color: var(--text); padding: 0 0 18px; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.brand-mark i { width: 5px; border-radius: 2px; background: var(--blue); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 22px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--nav-text);
}
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: var(--navy-3); color: #fff; font-weight: 500; }
.nav-item.selected { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--blue); }
.nav-item.disabled { opacity: 0.55; cursor: default; }
.nav-item.disabled:hover { background: none; color: var(--nav-text); }
.nav-item .stage { margin-left: auto; background: var(--navy-3); color: var(--nav-text); }
.nav-label { font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: #7d889e; padding: 18px 14px 6px; border-top: 1px solid var(--navy-3); margin-top: 12px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--navy-3); padding-top: 12px; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 14px 10px 4px; }
.user-box b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.user-box small { color: #7d889e; font-size: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--navy-3); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px; padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.top-company { display: flex; align-items: center; gap: 10px; font-size: 15px; min-width: 150px; }
.top-company .ic { width: 22px; height: 22px; }
.search {
  flex: 1; max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; height: 36px; color: var(--faint);
}
.search input { border: 0; outline: 0; flex: 1; font: inherit; background: none; min-width: 0; }
.search kbd { font: 11px Inter, sans-serif; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.search { position: relative; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #e0e9fe; }
.search input { color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 27, 51, 0.12);
  padding: 6px; max-height: min(420px, 70vh); overflow-y: auto;
}
.sr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.sr-item .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.sr-item.active, .sr-item:hover { background: #eef3ff; }
.sr-item.active .ic { color: var(--blue); }
.sr-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sr-text b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-kind { font-size: 11px; color: var(--faint); white-space: nowrap; }
.sr-hint { font-size: 11px; color: var(--faint); padding: 8px 10px 4px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.sr-empty { font-size: 13px; color: var(--muted); padding: 12px 10px; line-height: 1.5; }
.card[id] { scroll-margin-top: 76px; }
.card.flash { animation: hf-flash 1.6s ease-out; }
@keyframes hf-flash { 0%, 30% { box-shadow: 0 0 0 3px #bcd0fd; } 100% { box-shadow: var(--shadow); } }
.lang-seg { margin-left: 0; }
.lang-seg button { font-size: 13px; padding: 7px 16px; }
.last-update { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
.last-update small { display: block; color: var(--muted); font-size: 11px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.menu-btn { display: none; }

.content { padding: 26px 28px 40px; max-width: 1440px; width: 100%; }
.loading, .empty { color: var(--muted); font-size: 13px; }
.empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 18px; background: #fafbfd;
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 90px; flex: 1;
}

/* ---------- Page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
.subtitle { margin: 6px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.select {
  display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; height: 42px; padding: 0 16px; font-weight: 500; font-size: 13px; min-width: 170px;
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-head .stage, .card-head .pill { margin-left: auto; }
.note { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.note .stage { margin-right: 6px; }

.stage {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px;
  background: #eef3ff; color: var(--blue); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.pill { display: inline-block; font-size: 11px; font-weight: 500; border-radius: 999px; padding: 2px 9px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: #e7f6ec; color: var(--green); }
.pill.off { background: #f1f3f7; color: var(--muted); }
.pill.warn { background: #fdf3e2; color: var(--amber); }
.tag { font-size: 10px; background: var(--blue); color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }

.headline-card { margin-bottom: 18px; }
.headline { display: flex; gap: 16px; align-items: flex-start; }
.headline h2 { font-size: 19px; font-weight: 600; margin: 4px 0 4px; line-height: 1.35; }
.headline p { margin: 0; font-size: 13px; }
.headline-icon {
  width: 38px; height: 38px; border-radius: 50%; background: #e7f6ec; color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.sources { list-style: none; padding: 0; margin: 14px 0 0 54px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sources li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sources small { color: var(--muted); width: 100%; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.kpi-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.kpi-value { font-size: clamp(18px, 1.9vw, 26px); white-space: nowrap; font-weight: 700; margin: 10px 0 6px; letter-spacing: -0.3px; }
.kpi-foot { font-size: 12px; color: var(--muted); }
.muted-value { color: var(--faint); }
.big { font-size: clamp(17px, 1.9vw, 26px); font-weight: 700; margin: 6px 0; white-space: nowrap; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 340px; gap: 18px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.layout .card + .card { margin-top: 0; }
.span-main { grid-column: span 2; }
.side { grid-column: 3; }
.cash { display: flex; gap: 24px; align-items: stretch; }
.cash > div:first-child { min-width: 170px; }
.cash small { color: var(--muted); font-size: 12px; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; padding: 7px 8px; background: #f7f8fb; white-space: nowrap; }
.table td { padding: 6px 8px; border-top: 1px solid var(--line-2); color: var(--faint); white-space: nowrap; }
.table td:first-child { color: var(--text); }
.table tr.current td { background: #f1f5ff; font-weight: 600; }
.table.conn td { color: var(--text); vertical-align: top; padding: 10px; }
.block { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; max-width: 340px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.ytd { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ytd-cell { background: #f7f8fb; border-radius: 10px; padding: 14px; min-width: 0; overflow: hidden; }
.ytd-cell small { color: var(--muted); font-size: 12.5px; }

.actions { display: flex; flex-direction: column; gap: 8px; }
.actions a { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.actions a:hover { background: #f7f8fb; }
.actions a .ic:last-child { margin-left: auto; width: 14px; color: var(--faint); }

.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.company-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.company-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 11px; color: var(--muted); }
.mini-row > span { min-width: 0; }
.mini-row b { display: block; color: var(--faint); font-size: 13px; margin-top: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.banner { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; }
.banner.ok { background: #e7f6ec; color: #11723a; }
.banner.err { background: #fdecec; color: #a4262c; }
.card + .card { margin-top: 18px; }
.grid .card + .card { margin-top: 0; }

.btn, .btn-primary {
  font: inherit; font-size: 12.5px; border-radius: 8px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text); display: inline-block;
}
.btn:hover { background: #f7f8fb; }
.btn.danger { color: var(--red); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); padding: 11px; font-size: 14px; font-weight: 600; width: 100%; }
.btn-primary:disabled { opacity: 0.6; }

/* ---------- Numeros ---------- */
.delta { font-weight: 600; font-style: normal; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.neg { color: var(--red) !important; }
.headline-icon.neg { background: #fdecec; color: var(--red); }
.kpi-foot .delta { margin-right: 4px; }
.cash > div:first-child .big { color: var(--text); }
.chart { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 4px 8px; }
.chart-y { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; padding: 4px 0; }
.line-chart { grid-column: 2; width: 100%; height: 150px; display: block; }
.line-chart .area { fill: #2563eb; fill-opacity: 0.08; }
.line-chart .line { fill: none; stroke: var(--blue); stroke-width: 2; }
.chart-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.insights { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.45; }
.insights li { border-bottom: 1px solid var(--line-2); padding-bottom: 10px; }
.insights li:last-child { border-bottom: 0; padding-bottom: 0; }
.insights .muted { color: var(--muted); font-size: 12px; }
.warn-text { color: var(--amber); }
a.company-card { display: block; }
a.company-card:hover { border-color: #c7d2e8; }
.mini-row i.delta { display: block; font-size: 11px; margin-top: 2px; }
.mini-row b:not(.neg) { color: var(--text); }
.table td { color: var(--text); }
.table td:first-child { color: var(--text); }

.table-wrap:has(.quarters) { margin-top: 14px; }
.table.quarters td:first-child small { display: block; font-size: 10.5px; }
.table.weekly th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.table.weekly th[rowspan] { vertical-align: bottom; }
.recv { display: flex; flex-direction: column; gap: 14px; }
.recv .big { margin: 2px 0; }
.bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.bars li { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 8px; }
.bars i { display: block; height: 8px; border-radius: 4px; background: var(--blue); opacity: 0.75; width: var(--w); }
.bars li.overdue i { background: var(--red); }
.bars li.overdue span, .bars li.overdue b { color: var(--red); }
.bars b { font-weight: 600; }
.recv-top ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.recv-top li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
.recv-top li:last-child { border-bottom: 0; }
.recv-top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recv-top li small { grid-column: 1 / -1; font-size: 11px; }
@media (max-width: 900px) {
  .table.weekly, .table.quarters { font-size: 11.5px; }
  .table.weekly th, .table.weekly td { padding: 6px 5px; }
}

.invite-row { display: flex; gap: 8px; margin-top: 8px; }
.invite-url { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #f7f8fb; color: var(--text); }

.hidden { display: none !important; }
.seg { margin-left: auto; display: inline-flex; background: var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { font: inherit; font-size: 12px; border: 0; background: none; padding: 5px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.cash-panels { flex: 1; min-width: 0; }
.cash-table { margin-top: 14px; }

/* ---------- Carregamento ---------- */
.loader { min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.loader-logo { font-size: 34px; padding: 0; }
.loader-logo .brand-mark { height: 30px; gap: 4px; }
.loader-logo .brand-mark i { width: 7px; animation: hf-bars 1.1s ease-in-out infinite; transform-origin: bottom; }
.loader-logo .brand-mark i:nth-child(1) { height: 12px; }
.loader-logo .brand-mark i:nth-child(2) { height: 20px; animation-delay: 0.15s; }
.loader-logo .brand-mark i:nth-child(3) { height: 30px; animation-delay: 0.3s; }
@keyframes hf-bars { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }
.progress { width: min(360px, 80vw); height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--blue); border-radius: inherit; transition: width 0.45s ease; }
.progress.indeterminate i { width: 35%; animation: hf-slide 1.2s ease-in-out infinite; }
@keyframes hf-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
.loader-label { color: var(--muted); font-size: 13px; min-height: 18px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .loader-logo .brand-mark i, .progress.indeterminate i { animation: none; }
  .progress i { transition: none; }
}

.row-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--text); flex-wrap: wrap; }
.row-kv > span:first-child { color: var(--muted); }
.actions-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.connect-steps ol { margin: 8px 0 6px 18px; line-height: 1.9; }
.bookmarklet { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; cursor: grab; }

/* ---------- Relatorios ---------- */
.nav-item .ext { margin-left: auto; width: 14px; height: 14px; opacity: 0.7; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; font-weight: 500; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--blue); }
.report-card { padding: 0; overflow: hidden; }
.report-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.report-head h2 { font-size: 15px; margin: 0 0 3px; }
.report-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-actions select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--card); }
.btn { display: inline-flex; align-items: center; gap: 6px; }
.btn .ic { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.pill.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.report-frame { display: block; width: 100%; height: calc(100vh - 230px); min-height: 620px; border: 0; background: var(--bg); }
.btn-primary-sm { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn-primary-sm:hover { background: #1d4ed8; }

/* ---------- Paginas legais (publicas) ---------- */
.legal-page { padding: 32px 16px; }
.legal { max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; line-height: 1.6; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 16px; margin: 26px 0 6px; }
.legal p, .legal li { color: #2d3a52; font-size: 14px; }
.legal a { color: var(--blue); }
.legal-links { margin-top: 28px; font-size: 13px; }
.login-card .btn-primary { display: block; text-align: center; }

/* ---------- Login ---------- */
.login-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 8px 30px rgba(15, 27, 51, 0.06); }
.login-card h1 { font-size: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.login-card input { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.login-card input:focus { outline: 2px solid #c7d7fe; border-color: var(--blue); }
.form-error { color: var(--red); font-size: 13px; margin: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .side { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; }
  body.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 10px; }
  .last-update, .search kbd { display: none; }
  .search { max-width: none; }
  .top-company { min-width: 0; }
  .content { padding: 20px 16px 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .span-main { grid-column: auto; }
  .kpis, .company-grid { grid-template-columns: minmax(0, 1fr); }
  .cash { flex-direction: column; }
  .sources { margin-left: 0; }
  .table.conn thead { display: none; }
  .table.conn tr { display: block; border-top: 1px solid var(--line-2); padding: 6px 0; }
  .table.conn td { display: block; border: 0; padding: 4px 0; }
  .row-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .top-company { display: none; }
}

/* ---------- E-mail semanal ---------- */
.field-label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.em-list { width: 100%; font: 13px/1.5 ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; color: var(--text); background: var(--card); }
.em-list:focus { outline: 2px solid #c7d7fe; border-color: var(--blue); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; }
.em-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.em-grid select { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--card); color: var(--text); }
#email-card .note { margin-top: 8px; }

/* ---------- Forecast ---------- */
.fc-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; margin-bottom: 16px; border-left: 4px solid var(--line); }
.fc-hero.good { border-left-color: var(--green); }
.fc-hero.warn { border-left-color: #f59e0b; }
.fc-hero.bad { border-left-color: var(--red); }
.fc-hero.empty-goal { display: block; border-left-color: var(--blue); }
.fc-hero.empty-goal h2 { font-size: 16px; margin-bottom: 4px; }
.fc-hero-value { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 12px; }
.fc-hero-value b { font-size: 34px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.fc-hero-value span { font-size: 16px; }
.fc-progress { position: relative; height: 12px; background: var(--line-2); border-radius: 999px; overflow: visible; }
.fc-progress i { display: block; height: 100%; width: var(--w, 0%); border-radius: 999px; background: linear-gradient(90deg, #3b82f6, var(--blue)); transition: width 0.6s ease; }
.fc-hero.good .fc-progress i, .fc-progress i.good { background: linear-gradient(90deg, #34d399, var(--green)); }
.fc-hero.warn .fc-progress i, .fc-progress i.warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.fc-hero.bad .fc-progress i, .fc-progress i.bad { background: linear-gradient(90deg, #fb7185, var(--red)); }
.fc-progress em { position: absolute; top: -4px; bottom: -4px; left: var(--l, 0%); width: 2px; background: var(--text); border-radius: 2px; opacity: 0.55; }
.fc-progress.sm { height: 6px; margin: 8px 0 6px; }
.fc-hero-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--text); }
.fc-done { color: var(--green); font-weight: 600; }
.fc-hero-side { display: grid; gap: 10px; align-content: center; }
.fc-hero-side > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 10px 12px; background: #f7f8fb; border-radius: 10px; }
.fc-hero-side b { font-size: 17px; font-variant-numeric: tabular-nums; }
.fc-hero-side small:last-child { grid-column: 1 / -1; font-size: 11px; }
.fc-note { margin: 0 0 10px; }
.fc-table td.num, .fc-table th:not(:first-child) { text-align: right; }
.fc-table td { font-variant-numeric: tabular-nums; vertical-align: middle; }
.fc-table td:first-child small { display: block; font-size: 11px; }
.fc-badge { display: inline-block; min-width: 74px; text-align: center; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; color: #fff; background: #94a3b8; font-variant-numeric: tabular-nums; }
.fc-badge.good { background: var(--green); }
.fc-badge.warn { background: #f59e0b; }
.fc-badge.bad { background: var(--navy); }
.fc-badge.none { background: var(--line-2); color: var(--muted); }
.fc-badge.soft.good { background: #e7f6ec; color: #11723a; }
.fc-badge.soft.bad { background: #fdecec; color: #a4262c; }
.fc-badge.soft.none { background: var(--line-2); color: var(--muted); font-weight: 500; }
.fc-gap.good { color: var(--green); font-weight: 600; }
.fc-gap.warn { color: #b45309; font-weight: 600; }
.fc-gap.bad { color: var(--red); font-weight: 600; }
.fc-clinics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fc-clinic { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--text); }
a.fc-clinic:hover { border-color: #c7d2e8; box-shadow: 0 4px 14px rgba(15, 27, 51, 0.06); }
.fc-clinic.off { background: #fafbfd; }
.fc-clinic-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.fc-clinic-head .fc-badge { min-width: 0; font-size: 11.5px; padding: 3px 8px; }
.fc-clinic-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.fc-clinic-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.fc-legend ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.fc-legend li { display: flex; align-items: center; gap: 10px; }
.fc-legend .fc-badge { min-width: 66px; font-size: 11.5px; padding: 3px 8px; }
.fc-editor { margin-bottom: 16px; border-color: #c7d7fe; }
.fc-editor select { margin-left: auto; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--card); }
.fc-input { width: 100%; min-width: 90px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; text-align: right; font-variant-numeric: tabular-nums; }
.fc-input:focus { outline: 2px solid #c7d7fe; border-color: var(--blue); }
.fc-input.sm { width: 64px; min-width: 0; display: inline-block; margin: 0 4px; }
.fc-suggest { display: inline-flex; align-items: center; font-size: 13px; color: var(--muted); }
.warn-banner { background: #fdf3e2; color: #6b4a12; }
@media (max-width: 900px) {
  .fc-hero { grid-template-columns: minmax(0, 1fr); }
  .fc-badge { min-width: 0; }
}
