/* Acompanhamento de Tráfego
   Paleta: off-white #F2F2F2, navy #05142A, quase-preto #080B12, azul #0067E1, azul claro #0A84FF, cinza aço #9EA1A6 */

:root {
  --bg: #F2F2F2;
  --card: #FFFFFF;
  --navy: #05142A;
  --ink: #080B12;
  --blue: #0067E1;
  --blue-2: #0A84FF;
  --blue-soft: #E8F1FD;
  --steel: #9EA1A6;
  --text-2: #5B616B;
  --line: #E2E4E8;
  --line-2: #D3D6DB;
  --ok: #1D7A3B;  --ok-bg: #E5F4EA;
  --warn: #8A5800; --warn-bg: #FFF3D1;
  --bad: #B42318; --bad-bg: #FDECEA;
  --r-lg: 18px;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(5, 20, 42, .06), 0 4px 16px rgba(5, 20, 42, .04);
  --side-w: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--blue); }
small { font-size: 13px; }
img { max-width: 100%; }
.ic { flex: none; }
:focus-visible { outline: 3px solid rgba(0, 103, 225, .45); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--text-2); }
.block { display: block; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }

/* ---------- Estrutura ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w);
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; padding: 22px 14px;
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 17px;
  padding: 4px 10px 22px;
}
.brand .ic { color: var(--blue-2); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255, 255, 255, .74); text-decoration: none; font-weight: 500;
  padding: 11px 12px; border-radius: 10px;
}
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.is-active { background: var(--blue); color: #fff; }
.side-link .badge { margin-left: auto; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.side-user { padding: 4px 12px 10px; display: flex; flex-direction: column; }
.side-user strong { font-size: 14px; }
.side-user span { font-size: 13px; color: rgba(255, 255, 255, .6); }
.side-small {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-align: left;
  color: rgba(255, 255, 255, .7); text-decoration: none; padding: 8px 12px; border-radius: 8px;
}
.side-small:hover, .side-small.is-active { color: #fff; background: rgba(255, 255, 255, .07); }
.side form { margin: 0; }

.top { display: none; }
.bottom { display: none; }

.main {
  margin-left: var(--side-w);
  padding: 32px 40px 64px;
  max-width: calc(1120px + var(--side-w));
}

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .sub { color: var(--text-2); margin: 6px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.back:hover { color: var(--blue); }
.block-title { margin-bottom: 12px; }
.block { margin-bottom: 28px; }

/* ---------- Cartões ---------- */
.card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 18px;
}
.card > h2 { margin-bottom: 14px; }
.card > h2 + .muted { margin-top: -8px; }
.card.soft { background: #F8F9FA; box-shadow: none; border: 1px solid var(--line); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; }
.card.danger { border: 1px solid #F3C7C2; box-shadow: none; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head.pad { padding: 20px 22px 0; }
.card-head h2 { margin: 0; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pad { padding-left: 22px; padding-right: 22px; }
.empty { text-align: center; color: var(--text-2); padding: 40px 22px; }
.empty .ic { color: var(--steel); margin-bottom: 8px; }
.empty p { margin: 0; }
.empty-inline { color: var(--text-2); margin: 0; padding-bottom: 20px; }
.card .empty-inline:only-child { padding-bottom: 0; }
p.empty-inline.card { padding: 22px; }
.note { font-size: 13.5px; color: var(--text-2); margin: -6px 0 18px; }
.prose { white-space: normal; overflow-wrap: anywhere; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 500; font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.grid-2.gap { gap: 0 18px; align-items: start; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* ---------- Painel ---------- */
.dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.seg { display: inline-flex; background: #E4E6EA; border-radius: 12px; padding: 4px; }
.seg-item { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.seg-item:hover { color: var(--navy); }
.seg-item.is-on { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 2px rgba(5, 20, 42, .12); }
.dash-dates { font-size: 13.5px; color: var(--text-2); }

.notice {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px;
}
.notice > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notice span { font-size: 13.5px; }
.notice-warn { background: var(--warn-bg); color: #5C3B00; }
.notice-warn .ic { color: var(--warn); }
.notice-late { background: var(--warn-bg); color: #5C3B00; box-shadow: inset 4px 0 0 var(--bad); }
.notice-late .ic { color: var(--bad); }

/* O destaque do painel: quanto voltou de cada real */
.hero {
  background: var(--navy); color: #fff;
  border-radius: 22px; padding: 28px 30px 30px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; border: 36px solid rgba(10, 132, 255, .12); pointer-events: none;
}
.hero-lead { font-size: 16px; color: rgba(255, 255, 255, .78); margin: 0 0 4px; font-weight: 500; }
.hero-value { font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 22px; font-variant-numeric: tabular-nums; }
.hero-value.hero-wait { font-size: 30px; color: rgba(255, 255, 255, .92); margin-bottom: 10px; letter-spacing: -0.015em; }
.hero-foot { color: rgba(255, 255, 255, .7); margin: 0 0 14px; max-width: 52ch; }
.hero-bars { display: flex; flex-direction: column; gap: 10px; max-width: 620px; position: relative; z-index: 1; }
.hb { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 14px; font-size: 14px; }
.hb-label { color: rgba(255, 255, 255, .72); }
.hb-track { height: 10px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 99px; }
.hb-inv { background: var(--steel); }
.hb-fat { background: var(--blue-2); }
.hb-num { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.stat { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.stat-val { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--blue); font-variant-numeric: tabular-nums; }
.stat-help { font-size: 13px; color: var(--text-2); }

.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-inv { background: var(--steel); }
.lg-fat { background: var(--blue); }
.chart { display: flex; align-items: stretch; gap: 6px; height: 190px; padding-top: 6px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: default; min-width: 0; }
.chart-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; border-bottom: 1px solid var(--line); }
.bar { width: min(18px, 38%); border-radius: 5px 5px 0 0; }
.bar-inv { background: var(--steel); }
.bar-fat { background: var(--blue); }
.chart-col.is-sel .chart-pair { background: var(--blue-soft); border-radius: 6px 6px 0 0; }
.chart-x { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-hint { font-size: 13px; color: var(--text-2); margin: 12px 0 0; min-height: 20px; }
.comment p { margin: 0; white-space: normal; }

/* ---------- Formulários ---------- */
.form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 600; color: var(--navy); padding: 0; }
.field small { color: var(--text-2); }
input, select, textarea {
  font: inherit; color: var(--navy); width: 100%;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 12px; min-height: 46px;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--steel); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 103, 225, .18); }
input[type="file"] { padding: 9px; background: #FAFAFB; }
input[type="radio"] { width: auto; min-height: 0; }
.money { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; }
.money:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 103, 225, .18); }
.money > span { padding-left: 12px; color: var(--text-2); font-weight: 600; }
.money input { border: 0; box-shadow: none !important; }
.input-btn { display: flex; gap: 8px; }
.input-btn .btn { flex: none; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fs { border: 0; padding: 0; margin: 0 0 8px; }
.fs legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; padding: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1; min-width: 200px; }
form.inline { display: inline; margin: 0; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-opt { position: relative; }
.choice-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  border: 1.5px solid var(--line-2); border-radius: var(--r); font-weight: 600; font-size: 16px; background: #fff;
}
.choice-opt input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; }
.choice-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 103, 225, .3); }

.more { margin: 0 0 16px; }
.more summary { cursor: pointer; color: var(--blue); font-weight: 500; font-size: 14px; list-style: none; padding: 4px 0; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 8px; }
.more .field { margin: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0059C2; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--ink); }
.btn-light { background: #fff; color: var(--navy); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 4px 2px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--blue); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { color: var(--bad); }
.btn-reset { background: none; border: 0; font: inherit; cursor: pointer; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--navy); background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }

/* ---------- Selos, alertas ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-mute { background: #ECEDEF; color: var(--text-2); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--blue-2); color: #fff; font-size: 12px; font-weight: 700; }
.badge-warn { background: #E8A100; }

.alert { border-radius: var(--r); padding: 13px 16px; margin-bottom: 16px; font-size: 14.5px; }
.alert-ok { background: var(--ok-bg); color: #145A2B; }
.alert-erro { background: var(--bad-bg); color: #8E1B12; }
.alert-aviso { background: var(--warn-bg); color: #5C3B00; }
.alert-cred { background: #fff; border: 2px solid var(--blue); box-shadow: var(--shadow); padding: 18px 20px; }
.cred-head { display: flex; align-items: center; gap: 8px; color: var(--blue); margin-bottom: 6px; font-size: 16px; }
.alert-cred p { color: var(--text-2); margin-bottom: 12px; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; }
.cred dt { color: var(--text-2); font-size: 14px; }
.cred dd { margin: 0; font-weight: 600; word-break: break-all; }
.cred dd.mono { font-size: 17px; color: var(--navy); }

.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.summary-item { font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 10px; }
.summary-item.is-bad { background: var(--bad-bg); color: var(--bad); }
.summary-item.is-blue { background: var(--blue-soft); color: var(--blue); }

/* ---------- Listas ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.pad-rows { padding: 6px 22px 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-main .muted { font-size: 13.5px; }
.row-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.list-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list-card {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px;
  text-decoration: none; color: var(--navy);
}
.list-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list-card .muted { font-size: 13.5px; }
.list-card:hover { box-shadow: 0 0 0 1.5px var(--blue), var(--shadow); }
.list-card.is-pending { box-shadow: inset 4px 0 0 #E8A100, var(--shadow); }
.date-chip { flex: none; width: 50px; text-align: center; background: var(--blue-soft); color: var(--blue); border-radius: 10px; padding: 6px 0; display: flex; flex-direction: column; line-height: 1.1; }
.date-chip strong { font-size: 18px; }
.date-chip small { font-size: 12px; }

.link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.link-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: var(--navy); height: 100%; }
.link-card:hover { box-shadow: 0 0 0 1.5px var(--blue), var(--shadow); }
.link-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.link-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.link-txt strong { overflow-wrap: anywhere; }
.link-txt small { color: var(--text-2); }
.link-go { color: var(--steel); }

.files { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #F6F7F9; border-radius: 10px; padding: 10px 12px; }
.files a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.files small { color: var(--text-2); }
.files form { margin-left: auto; }

.answer { background: var(--blue-soft); border-radius: var(--r); padding: 14px 16px; margin-top: 12px; }
.answer-label { display: block; font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.answer p { margin: 0; }
.pedido.is-answered { box-shadow: inset 4px 0 0 var(--blue), var(--shadow); }

.weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.week { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: #F6F7F9; border-radius: 12px; padding: 12px; }
.week-date { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.week small { color: var(--text-2); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFC; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 12px; }
.strong-link { font-weight: 600; color: var(--navy); text-decoration: none; }
.strong-link:hover { color: var(--blue); }

/* ---------- Filtros e abas ---------- */
.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.filters select { width: auto; min-width: 140px; }
.search-line { position: relative; display: flex; align-items: center; flex: 1; }
.search-line .ic { position: absolute; left: 12px; color: var(--steel); pointer-events: none; }
.search-line input { padding-left: 40px; }
.search-line .muted { position: absolute; right: 12px; font-size: 13px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14.5px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--navy); }
.tab.is-on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ---------- Lançar venda ---------- */
.sell-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sell-grid .card { margin-bottom: 18px; }
.sell-card .money input { font-size: 22px; font-weight: 700; min-height: 56px; }

/* ---------- Transcrição ---------- */
.transcript summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript[open] summary { margin-bottom: 14px; }
.transcript[open] summary .muted { display: none; }
.transcript-body { max-height: 560px; overflow-y: auto; margin-top: 12px; padding-right: 6px; }
.transcript-body p { margin: 0 0 10px; overflow-wrap: anywhere; }
.transcript-body p.is-hidden { display: none; }
mark { background: #FFE58A; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Login ---------- */
body.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.auth-box { width: 100%; max-width: 420px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 32px 28px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--navy); margin-bottom: 28px; }
.auth-brand .ic { color: var(--blue); }
.auth-title { font-size: 24px; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); margin-bottom: 22px; }
.auth-link { display: block; text-align: center; margin-top: 16px; color: var(--text-2); font-size: 14px; text-decoration: none; width: 100%; }
.auth-link:hover { color: var(--blue); }

/* ---------- Celular e tablet ---------- */
@media (max-width: 1100px) {
  .weeks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .side { display: none; }
  .top {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 15;
    background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line); padding: 8px 12px 8px 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }
  .brand-top { color: var(--navy); padding: 0; font-size: 16px; }
  .brand-top .ic { color: var(--blue); }
  .top-actions { display: flex; gap: 2px; }
  .top-actions form { margin: 0; }
  .main { margin-left: 0; padding: 20px 16px calc(96px + var(--safe-b)); }
  .bottom {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + var(--safe-b));
  }
  .bottom-link { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--text-2); font-size: 11.5px; font-weight: 500; padding: 6px 2px; border-radius: 10px; }
  .bottom-link.is-active { color: var(--blue); font-weight: 600; }
  .bottom-ic { position: relative; display: inline-flex; }
  .badge-dot { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }

  h1 { font-size: 22px; }
  .page-head { flex-wrap: wrap; margin-bottom: 18px; }
  .card { padding: 18px; border-radius: 16px; }
  .card-head.pad { padding: 18px 18px 0; }
  .pad { padding-left: 18px; padding-right: 18px; }
  .pad-rows { padding: 4px 18px 6px; }
  .grid-2, .grid-3, .sell-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: auto; }
  .hero { padding: 22px 20px 24px; border-radius: 18px; }
  .hero-value { font-size: 42px; }
  .hero-value.hero-wait { font-size: 24px; }
  .hb { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .hb-label { grid-column: 1; }
  .hb-num { grid-column: 2; grid-row: 1; min-width: 0; }
  .hb-track { grid-column: 1 / -1; }
  .stat { padding: 16px; }
  .stat-val { font-size: 20px; }
  .dash-bar { flex-direction: column; align-items: stretch; }
  .seg { display: grid; grid-template-columns: repeat(3, 1fr); }
  .seg-item { text-align: center; padding: 9px 6px; font-size: 13.5px; }
  .dash-dates { text-align: center; }
  .notice { flex-wrap: wrap; }
  .notice .btn { width: 100%; }
  .row { flex-direction: column; align-items: flex-start; }
  .row-side { justify-content: flex-start; }
  .filters { flex-direction: column; }
  .filters select { width: 100%; }
  .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { height: 160px; gap: 3px; }
  .chart-x { font-size: 11px; }
  .page-head > .btn { width: 100%; }
}

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