:root {
  color-scheme: light;
  --bg: #f5f5f3; --surface: #ffffff; --surface-2: #f0efec; --border: #e2e1dc;
  --text: #17171a; --text-2: #55545a; --muted: #85848a;
  --accent: #ff441f; --accent-ink: #ffffff; --accent-soft: #fff0ec;
  --viz: #2a78d6;
  --ok: #17794a; --ok-bg: #e3f4ea; --warn: #96600a; --warn-bg: #fdf0d2;
  --bad: #b42318; --bad-bg: #fde7e4; --info: #1d5fb8; --info-bg: #e4eefb;
  --neutral: #55545a; --neutral-bg: #ebeae6; --violet: #5b3fb3; --violet-bg: #ece7fa;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101012; --surface: #1a1a1d; --surface-2: #232327; --border: #2f2f35;
    --text: #f4f4f5; --text-2: #c3c2c8; --muted: #8e8d95;
    --accent: #ff5a38; --accent-ink: #160804; --accent-soft: #33170f;
    --viz: #3987e5;
    --ok: #6fd6a0; --ok-bg: #12301f; --warn: #f0c060; --warn-bg: #35280c;
    --bad: #ff8f85; --bad-bg: #3a1613; --info: #8ab8f5; --info-bg: #14263f;
    --neutral: #c3c2c8; --neutral-bg: #2a2a2f; --violet: #b7a4f2; --violet-bg: #251d42;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand strong { display: block; font-size: 15px; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.pop-wrap { position: relative; }
.icon-btn, .user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text); cursor: pointer; padding: 7px; border-radius: 8px; font: inherit; position: relative; }
.icon-btn:hover, .user-btn:hover { background: var(--surface-2); }
.dot { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-weight: 700; }
.user-name { text-align: left; line-height: 1.2; font-weight: 600; font-size: 13px; }
.user-name small { display: block; font-weight: 400; color: var(--muted); }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 30; }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; padding: 10px 14px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.nova { background: var(--accent-soft); }
.notif b { font-size: 12px; font-variant-numeric: tabular-nums; }
.notif time { float: right; font-size: 12px; color: var(--muted); }
.notif span { display: block; }
.pop-menu { width: 220px; padding: 6px; }
.pop-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pop-menu button:hover { background: var(--surface-2); }
.pop-mail { margin: 0; padding: 8px 10px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pop-empty { padding: 20px 14px; color: var(--muted); text-align: center; }

/* ---------- Layout ---------- */
.main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.danger-zone { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.danger-zone p { margin: 4px 0 0; }
.btn-ghost { border-color: transparent; background: none; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); }
label .req { color: var(--accent); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { display: inline-block; width: auto; margin: 0 6px 0 0; }
.hint { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); font-size: 12px; }
.err { display: block; margin-top: 4px; font-weight: 500; color: var(--bad); font-size: 12px; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
.counter { float: right; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad); font-weight: 600; }
.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.alert-erro { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); }
.st-recebido { background: var(--warn-bg); color: var(--warn); }
.st-visualizado { background: var(--violet-bg); color: var(--violet); }
.st-em-processo { background: var(--info-bg); color: var(--info); }
.st-aguardando-solicitante { background: var(--accent-soft); color: var(--accent); }
.st-concluido { background: var(--ok-bg); color: var(--ok); }
.st-cancelado { background: var(--bad-bg); color: var(--bad); }
.pr-baixa { background: var(--neutral-bg); color: var(--neutral); }
.pr-media { background: var(--info-bg); color: var(--info); }
.pr-alta { background: var(--warn-bg); color: var(--warn); }
.pr-urgente { background: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .pr-urgente { color: #1b0503; } }
.pz-ok { background: var(--ok-bg); color: var(--ok); }
.pz-perto { background: var(--warn-bg); color: var(--warn); }
.pz-atrasado { background: var(--bad-bg); color: var(--bad); }

/* ---------- KPIs e filtros ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.kpi:hover { border-color: var(--muted); }
.kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi span { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
.kpi b { display: block; font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi.static { cursor: default; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.filters.more { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--surface-2); border-radius: 10px; }
.tabs button { border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; padding: 7px 14px; border-radius: 7px; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.filters input, .filters select { margin-top: 3px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--text-2); font-size: 13px; }

/* ---------- Tabela ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; background: var(--surface-2); }
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--text); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tr.urgente td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
td.id { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td.titulo { max-width: 280px; }
td.titulo b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-2); }

/* ---------- Drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: var(--bg); z-index: 50; overflow-y: auto; box-shadow: var(--shadow); }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; margin-top: 2px; overflow-wrap: anywhere; }
.drawer-body { padding: 18px 20px 40px; display: grid; gap: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 12px 0 0; }
.dl div.full { grid-column: 1 / -1; }
.dl dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.dl dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.steps { display: flex; margin: 14px 0 2px; padding: 0; list-style: none; }
.steps li { flex: 1; position: relative; padding-top: 22px; font-size: 12px; text-align: center; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--border); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--text-2); }
.steps li.done::before, .steps li.done::after { background: var(--ok); }
.steps li.now { color: var(--text); font-weight: 700; }
.steps li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps li.now::after { background: var(--ok); }
.devolutiva { background: var(--ok-bg); color: var(--text); border-radius: 9px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; }
.thread { display: grid; gap: 10px; margin-top: 12px; }
.msg { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.msg.adm { border-left: 3px solid var(--accent); }
.msg.interno { background: var(--warn-bg); border-style: dashed; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg-head b { color: var(--text); font-size: 13px; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hist { list-style: none; margin: 12px 0 0; padding: 0; border-left: 2px solid var(--border); }
.hist li { position: relative; padding: 0 0 14px 16px; font-size: 13px; }
.hist li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 2px solid var(--bg); }
.hist time { display: block; font-size: 12px; color: var(--muted); }
.hist q { display: block; color: var(--text-2); quotes: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.mt { margin-top: 12px; }

/* ---------- Formulário / revisão ---------- */
.form { max-width: 860px; }
.form .card + .card { margin-top: 14px; }
.form h2 { margin-bottom: 14px; }
.review { max-width: 760px; }
.success { max-width: 520px; margin: 40px auto; text-align: center; }
.success .big { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 8px 0; }

/* ---------- Gráficos (barras em HTML, uma série, valor sempre rotulado) ---------- */
.chart h2 { margin-bottom: 12px; }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar .lb { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .tr { height: 14px; }
.bar .fill { height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--viz); }
.bar:hover .fill { filter: brightness(1.12); }
.bar .vl { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 150px; border-bottom: 1px solid var(--border); }
.cols .col { flex: 1; min-width: 3px; background: var(--viz); border-radius: 4px 4px 0 0; position: relative; }
.cols .col.zero { background: var(--border); }
.cols .col:hover { filter: brightness(1.15); }
.cols .col:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 12px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; z-index: 3; pointer-events: none; }
.cols-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Toast / login ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 80; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.erro { background: var(--bad); color: #fff; }
body.auth { min-height: 100vh; background: var(--surface); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 44px 52px; color: #fff;
  background: radial-gradient(900px 520px at 0% 0%, rgba(255, 68, 31, .55), transparent 62%), radial-gradient(700px 500px at 100% 100%, rgba(255, 138, 61, .22), transparent 60%), #15100e; }
.auth-side .brand { color: #fff; }
.auth-side .brand small { color: rgba(255, 255, 255, .7); }
.auth-side .brand-mark { background: #ff441f; color: #fff; box-shadow: 0 6px 18px rgba(255, 68, 31, .45); }
.auth-pitch h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 15em; }
.auth-pitch ul { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 20px; max-width: 30em; }
.auth-pitch li { display: flex; gap: 14px; align-items: flex-start; color: rgba(255, 255, 255, .74); font-size: 14px; }
.auth-pitch li b { display: block; color: #fff; font-size: 15px; margin-bottom: 1px; }
.tick { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: rgba(255, 255, 255, .14); position: relative; }
.tick::after { content: ""; position: absolute; left: 8px; top: 5px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.auth-foot { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .55); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form { width: 100%; max-width: 384px; }
.auth-form h1 { font-size: 28px; letter-spacing: -.02em; }
.auth-lead { margin: 8px 0 26px; color: var(--text-2); }
.auth-form form { display: grid; gap: 16px; }
.auth-form input { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
.auth-form input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pw { position: relative; display: block; }
.pw input { padding-right: 86px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2.5px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 9px; border-radius: 7px; cursor: pointer; }
.pw button:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 13px 16px; font-size: 16px; border-radius: 10px; margin-top: 4px; }
.auth-alt { margin: 22px 0 0; text-align: center; color: var(--text-2); font-size: 14px; }
.auth-alt a { font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-help { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-side { padding: 22px 20px; gap: 0; }
  .auth-pitch, .auth-foot { display: none; }
  .auth-main { place-items: start center; padding: 32px 20px 40px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .user-name { display: none; }
  .main { padding: 18px 16px 60px; }
  .filters, .filters.more, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .g2, .g3, .dl { grid-template-columns: minmax(0, 1fr); }
  .table-wrap { border: 0; background: none; overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
  td { border: 0; padding: 3px 0; }
  td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  td.titulo { max-width: none; }
  td.titulo b { white-space: normal; }
  tr.urgente td:first-child { box-shadow: none; }
  tr.urgente { border-left: 3px solid var(--bad); }
  .steps li { font-size: 10px; }
}

/* ---------- Planilha (esquema da planilha de lançamentos) ---------- */
:root { --sh-d: #a64d79; --sh-d2: #d5a6bd; --sh-s: #0b3a5e; --sh-s2: #9fc5e8; --sh-i: #38761d; --sh-i2: #b6d7a8; --sh-cell: #fce5cd; --sh-ink: #17171a; }
@media (prefers-color-scheme: dark) { :root { --sh-d2: #5a2f45; --sh-s2: #1c3f5c; --sh-i2: #27451b; --sh-cell: #3a2a1c; --sh-ink: #f4f4f5; } }
.sheet-title { font-weight: 400; font-size: 24px; }
.sheet-title b { color: #f4a100; font-weight: 800; letter-spacing: .01em; }
.sheet { max-height: calc(100vh - 210px); overflow: auto; }
.sheet table { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sheet th, .sheet td { border-right: 1px dotted var(--border); border-bottom: 1px dotted var(--border); padding: 7px 10px; text-align: center; white-space: nowrap; }
.sheet thead th { position: sticky; z-index: 2; }
.sheet tr.band th { top: 0; height: 30px; color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.sheet tr.band th { text-align: left; }
.sheet tr.band span { position: sticky; left: 12px; display: inline-block; }
.sheet thead tr:nth-child(2) th { top: 30px; color: var(--sh-ink); text-transform: uppercase; font-size: 11px; }
.sheet .b-d { background: var(--sh-d); } .sheet .b-s { background: var(--sh-s); } .sheet .b-i { background: var(--sh-i); }
.sheet .h-d { background: var(--sh-d2); } .sheet .h-s { background: var(--sh-s2); } .sheet .h-i { background: var(--sh-i2); }
.sheet td.c-d { background: var(--sh-cell); font-variant-numeric: tabular-nums; }
.sheet td.c-w { white-space: normal; min-width: 240px; max-width: 340px; overflow-wrap: anywhere; }
.sheet tr.dia td { border-top: 2px solid var(--border); }
.sheet tbody tr:hover td { background: var(--surface-2); }
.sheet tr.vazio { cursor: default; } .sheet tr.vazio td { padding: 40px; color: var(--text-2); text-align: left; }
@media (max-width: 640px) {
  .sheet.table-wrap { border: 1px solid var(--border); background: var(--surface); overflow: auto; }
  .sheet table { display: table; } .sheet thead { display: table-header-group; } .sheet tbody { display: table-row-group; }
  .sheet tr, .sheet tbody tr { display: table-row; border: 0; padding: 0; margin: 0; border-radius: 0; }
  .sheet td { display: table-cell; padding: 7px 10px; border-right: 1px dotted var(--border); border-bottom: 1px dotted var(--border); }
}
