/* controle.bacciotti.net — visual limpo (Inter, linhas finas, cantos arredondados), tema
   VERDE-PETRÓLEO (identidade própria, diferente do roxo do retro e do azul do certificado.top) */
:root {
  --ink: #142022;
  --ink-soft: #56666a;
  --ink-faint: #93a3a6;
  --brand: #14857f;        /* verde-petróleo claro: ações, links, item ativo */
  --brand-dark: #0f6b66;
  --petrol: #0b3f43;       /* verde-petróleo escuro: menu lateral, títulos */
  --petrol-2: #0f5257;
  --hairline: #e1ecea;
  --surface: #f2f7f6;
  --tint: #e2f3f1;
  --radius: 14px;
  --sidebar-w: 256px;
}

body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--petrol-2); --bs-btn-active-border-color: var(--petrol-2); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-dark { --bs-btn-bg: var(--petrol); --bs-btn-border-color: var(--petrol); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-dark); }
.form-control, .form-select { border-radius: 10px; border: 1.5px solid #dfe6e5; padding: .6rem .85rem; }
.form-select { padding-right: 2.4rem; background-position: right .8rem center; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(20, 133, 127, .14); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-label { font-weight: 600; font-size: .88rem; }
.form-text { color: var(--ink-soft); }
.page-link { color: var(--brand); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--petrol); }
.brand img { border-radius: 8px; }
.brand-light { color: #fff; }

/* ==================== Entrar ==================== */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(520px circle at 15% 15%, rgba(20, 133, 127, .16), transparent 60%),
    radial-gradient(520px circle at 85% 85%, rgba(11, 63, 67, .14), transparent 60%),
    var(--surface);
}
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.login-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--hairline); border-radius: 18px;
  padding: 2.25rem 2rem; box-shadow: 0 24px 50px -30px rgba(11, 63, 67, .4);
}
.login-card h1 { color: var(--petrol); }

/* ==================== Área logada ==================== */
.app-body { background: var(--surface); }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-w); background: linear-gradient(180deg, var(--petrol) 0%, var(--petrol-2) 100%); color: #d5e9e7;
  display: flex; flex-direction: column;
}
@media (min-width: 992px) {
  .app-sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
  .app-sidebar.offcanvas-lg { visibility: visible !important; transform: none !important; }
}
@media (max-width: 991.98px) { .app-sidebar { --bs-offcanvas-width: 280px; } }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.25rem .8rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a, .sidebar-nav .disabled {
  display: flex; align-items: center; gap: .7rem; padding: .5rem .75rem; border-radius: 10px;
  color: #b3d1ce; text-decoration: none; font-weight: 500; font-size: .93rem;
}
.sidebar-nav i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-nav a.active { background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 8px 18px -10px rgba(20, 133, 127, .9); }
.sidebar-nav .disabled { color: #6f9894; cursor: default; }
.sidebar-nav .disabled .soon { margin-left: auto; font-size: .78rem; width: auto; opacity: .7; }
.sidebar-section {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #79a6a1;
  padding: 1rem .75rem .35rem;
}
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; border-radius: 8px; user-select: none; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary:hover { color: #fff; }
.sidebar-group > summary i { margin-left: auto; width: auto; font-size: .75rem; transition: transform .15s; }
.sidebar-group:not([open]) > summary i { transform: rotate(-90deg); }
.sidebar-group > summary:focus-visible { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 2px; }
.sidebar-user { display: flex; align-items: center; gap: .65rem; padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar-user .btn-link { color: #9cc4c0; }
.sidebar-user .btn-link:hover { color: #fff; }
.app-sidebar .btn-close { filter: invert(1); }
.sidebar-user-info { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-user-info strong { font-size: .88rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: .76rem; color: #86b0ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--tint); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: .85rem; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 10; }
.app-content { flex: 1; padding: clamp(1rem, 3vw, 2.25rem); max-width: 1180px; width: 100%; }
.app-footer { padding: 1rem clamp(1rem, 3vw, 2.25rem) 1.5rem; color: var(--ink-faint); font-size: .82rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0; color: var(--petrol); }
.page-head p { color: var(--ink-soft); margin: .3rem 0 0; }

.panel { background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1.35rem; }
.panel + .panel { margin-top: 1.25rem; }
.panel-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.panel-title i { color: var(--brand); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: #fff; border: 1px solid var(--hairline); border-top: 3px solid var(--tint); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat .label { font-size: .8rem; color: var(--ink-soft); font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.stat .label i { color: var(--brand); }
.stat .value { font-size: 1.55rem; white-space: nowrap; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: .78rem; color: var(--ink-faint); }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--hairline); min-width: 0; }
.list-plain li:first-child { border-top: 0; }
.list-plain li.is-today { font-weight: 600; }
.day-pill { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.8rem; border-radius: 8px; background: var(--tint); color: var(--brand-dark); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }

.phase-list { list-style: none; padding: 0; margin: 0; }
.phase-list li { display: flex; gap: .8rem; padding: .45rem 0; line-height: 1.35; }
.phase-dot { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface); color: var(--ink-faint); border: 1.5px solid var(--hairline); }
.phase-list li.done .phase-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.phase-list li.next .phase-dot { border-color: var(--brand); color: var(--brand); background: #fff; }
.phase-list li.done strong { color: var(--ink-soft); }
.badge-next { background: var(--tint); color: var(--brand-dark); font-weight: 600; }

.table-clean { margin: 0; }
.table-clean thead th { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b8f8b; border-bottom-width: 1px; background: transparent; white-space: nowrap; }
.table-clean td { vertical-align: middle; border-color: var(--hairline); }
.actions { display: flex; gap: .35rem; flex-wrap: nowrap; justify-content: flex-end; }
.actions .btn { white-space: nowrap; }
/* na tabela a célula continua célula (flex quebraria o alinhamento das linhas) */
td.actions { display: table-cell; text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: .35rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* tabela vira cartões no celular */
@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--hairline); border-radius: 12px; padding: .75rem .9rem; margin-bottom: .75rem; background: #fff; }
  .table-cards td { border: 0; padding: .2rem 0; text-align: left; }
  /* rótulo e valor na mesma linha (cartão mais baixo); a célula principal vai sem rótulo, maior */
  .table-cards td[data-label]::before { content: attr(data-label); display: inline-block; width: 38%; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--ink-faint); letter-spacing: .04em; vertical-align: baseline; }
  .table-cards td.main { font-size: 1.02rem; padding-bottom: .35rem; }
  .table-cards td.main::before { display: none; }
  .table-cards td.num { text-align: left; }
  .table-cards td.actions { display: block; text-align: left; margin-top: .4rem; }
}

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.empty-state > i { font-size: 2.6rem; color: var(--ink-faint); }
.empty-state h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: .8rem 0 .4rem; }

/* listas: filtros, rodapé com paginação e "por página", ordenação */
.list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.list-filters .form-check-label { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.list-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.per-page { display: flex; align-items: center; gap: .5rem; margin-left: auto; font-size: .85rem; color: var(--ink-soft); }
.per-page .form-select { width: auto; padding: .25rem 2.2rem .25rem .7rem; background-position: right .6rem center; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link i { font-size: .8rem; opacity: .45; }
.sort-link:hover, .sort-link.active { color: var(--brand); }
.sort-link.active i { opacity: 1; }

/* ==================== Cadastros ==================== */
.crumbs { margin-bottom: .5rem; font-size: .88rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.form-section { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-dark); margin: 1.75rem 0 .9rem; padding-bottom: .45rem; border-bottom: 1px solid var(--hairline); }
.form-section:first-of-type { margin-top: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 1rem; margin-top: 1.75rem; padding-top: 1.1rem; border-top: 1px solid var(--hairline); }
.audit { margin-right: auto; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .8rem; color: var(--ink-faint); }
.badge-blocked { background: #fdecea; color: #a1281d; border: 1px solid #f6c7c1; font-weight: 600; }
.badge-off { background: #eef1f1; color: #5d6b6d; border: 1px solid #dde3e3; font-weight: 600; }
.badge-type { background: var(--tint); color: var(--brand-dark); font-weight: 600; }
tr.is-off td { opacity: .6; }

.receitas { display: grid; gap: 1rem; }
.receita { border: 1px solid var(--hairline); border-radius: 12px; padding: .9rem 1rem; }
.receita.is-latest { border-color: #b7dcd8; box-shadow: 0 10px 24px -20px rgba(20, 133, 127, .8); }
.receita header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.rx-table { font-variant-numeric: tabular-nums; }
.rx-table th, .rx-table td { text-align: center; white-space: nowrap; border-color: var(--hairline); }
.rx-table thead th { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6b8f8b; }
.rx-table tbody th { color: var(--petrol); width: 3rem; }
.receita-obs { margin: .7rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.rx-grid { display: grid; grid-template-columns: 2.4rem repeat(6, minmax(0, 1fr)); gap: .45rem; align-items: center; margin-bottom: .5rem; }
.rx-grid > span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #6b8f8b; text-align: center; }
.rx-grid > strong { color: var(--petrol); }
.rx-grid .form-control { padding: .45rem .4rem; text-align: center; font-variant-numeric: tabular-nums; }
.rx-scroll { overflow-x: auto; }
.rx-scroll .rx-grid { min-width: 500px; }
.modal-content { border-radius: 16px; border: 0; }
.stock-low { display: inline-block; background: #fff3d6; color: #8a5a00; border-radius: 6px; padding: 0 .4rem; font-weight: 700; }

/* ==================== Efetuar venda (PDV) ==================== */
kbd { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 5px; padding: .02rem .3rem; font-size: .68rem; font-weight: 600; font-family: inherit; vertical-align: middle; }
.btn-primary kbd { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .3); }
.pdv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem; align-items: start; }
.pdv-side { position: sticky; top: 1rem; }
@media (max-width: 1099.98px) { .pdv-grid { grid-template-columns: minmax(0, 1fr); } .pdv-side { position: static; } }
@media (max-width: 767.98px) { .pdv-itens .pdv-in-qtd, .pdv-itens .pdv-in-preco { display: inline-block; margin-left: 0; } }
.pdv-side .panel + .panel, .pdv-main .panel + .panel { margin-top: 1rem; }
.pdv-label { display: flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b8f8b; margin-bottom: .4rem; }
.pdv-label i { color: var(--brand); font-size: .95rem; }
.pdv-add { display: flex; gap: .75rem; align-items: flex-end; }
.pdv-qtd { width: 96px; }
.search-box { position: relative; }
.search-results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: .25rem 0 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(11, 63, 67, .35); max-height: 360px; overflow-y: auto; }
.search-results li { padding: .5rem .65rem; border-radius: 8px; cursor: pointer; }
.search-results li.active, .search-results li:hover { background: var(--tint); }
.search-results li.empty { color: var(--ink-soft); cursor: default; background: none; }
.code-pill { display: inline-block; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: .05rem .45rem; font-weight: 600; font-size: .78rem; color: var(--ink-soft); }
.cliente-chip { display: flex; align-items: center; gap: .75rem; background: var(--tint); border-radius: 12px; padding: .6rem .8rem; }
.pdv-itens td { vertical-align: middle; }
.pdv-itens td:first-child { white-space: nowrap; }
.pdv-in-qtd { width: 72px; margin-left: auto; }
.pdv-in-preco { width: 110px; margin-left: auto; }
.badge-warn { background: #fff3d6; color: #8a5a00; border: 1px solid #f3dc9f; font-weight: 600; }
.pdv-totais { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; align-items: center; margin-bottom: .75rem; }
.pdv-totais dt { font-weight: 500; color: var(--ink-soft); margin: 0; }
.pdv-totais dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pdv-totais #descontoInput { max-width: 140px; }
.pdv-totais .total { font-size: 1.5rem; font-weight: 800; color: var(--petrol); border-top: 1px solid var(--hairline); padding-top: .5rem; }
.pag-linha { padding: .5rem 0; border-bottom: 1px dashed var(--hairline); }
.pag-linha select { flex: 1 1 auto; min-width: 0; }
.pag-valor { flex: 0 0 104px; max-width: 104px; }
.pag-crediario { margin-top: .45rem; }
.pag-parcelas { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .82rem; }
.pag-parcelas li { display: flex; justify-content: space-between; padding: .15rem 0; color: var(--ink-soft); }
.pdv-restante { font-size: .88rem; font-weight: 600; margin-top: .6rem; min-height: 1.3em; color: var(--ink-soft); }
.pdv-restante.ok { color: #1f7a4d; }
.pdv-restante.falta { color: #a1281d; }
.pdv-restante.sobra { color: #8a5a00; }
.pdv-atalhos { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--ink-soft); margin-top: .9rem; }

/* ==================== Impressão (A4) ==================== */
.print-body { background: #e9eeed; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1rem; background: #fff; border-bottom: 1px solid var(--hairline); }
.sheet { background: #fff; width: 210mm; min-height: 297mm; margin: 1rem auto; padding: 14mm 15mm; box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .3); font-size: 10.5pt; color: #111; font-family: Arial, Helvetica, sans-serif; }
.doc-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid #111; padding-bottom: 3mm; margin-bottom: 5mm; }
.doc-emp { font-size: 14pt; }
.doc-table { width: 100%; border-collapse: collapse; margin: 3mm 0 5mm; }
.doc-table th, .doc-table td { border-bottom: 1px solid #ccc; padding: 1.6mm 2mm; text-align: left; }
.doc-table th { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1.5px solid #111; }
.doc-table .num { text-align: right; white-space: nowrap; }
.doc-table tfoot td { border: 0; padding-top: 1mm; padding-bottom: 1mm; }
.doc-total td { font-size: 12pt; font-weight: 700; border-top: 1.5px solid #111 !important; }
.doc-nota { font-size: 8.5pt; color: #555; margin-top: 6mm; }
.doc-cancelada { border: 2px solid #a1281d; color: #a1281d; font-weight: 700; text-align: center; padding: 2mm; }
.doc-assinatura { margin-top: 14mm; text-align: center; font-size: 9.5pt; }
.recibo { border: 1.5px solid #111; padding: 8mm; font-family: "Times New Roman", serif; font-size: 12pt; line-height: 1.7; }
.recibo-top { display: flex; justify-content: space-between; font-family: Arial, sans-serif; font-weight: 700; font-size: 15pt; margin-bottom: 5mm; }
.sheet-promissorias { padding-top: 8mm; }
.promissoria { border: 1.5px solid #111; padding: 5mm 6mm; height: 88mm; margin-bottom: 4mm; display: flex; flex-direction: column; font-size: 10.5pt; line-height: 1.55; }
.prom-top { display: flex; flex-wrap: wrap; gap: 2mm 6mm; align-items: baseline; border-bottom: 1px solid #111; padding-bottom: 2mm; margin-bottom: 3mm; }
.prom-titulo { font-weight: 800; letter-spacing: .08em; font-size: 12pt; }
.prom-valor { margin-left: auto; font-weight: 800; font-size: 13pt; border: 1.5px solid #111; padding: .5mm 3mm; }
.prom-rodape { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; font-size: 9.5pt; }
.prom-rodape .doc-assinatura { margin-top: 0; }
@media print {
  @page { size: A4; margin: 0; }
  .no-print { display: none !important; }
  .print-body { background: #fff; }
  /* folha a folha sem página em branco no fim: quebra ANTES de cada folha, a partir da 2ª */
  .sheet { margin: 0; box-shadow: none; min-height: 0; }
  .sheet + .sheet { page-break-before: always; }
}
.stat-link { color: inherit; text-decoration: none; display: block; }
.stat-link:hover { border-color: #b7dcd8; }
.hint-box { background: #f1f8f7; border: 1px solid #d5ebe8; border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; color: #22403d; }
.cert-tabs { flex-wrap: wrap; gap: .25rem; }
.cert-tabs .nav-link { border-radius: 999px; padding: .35rem .9rem; font-weight: 500; color: var(--ink-soft); }
.cert-tabs .nav-link.active { background: var(--brand); color: #fff; }
tr.is-late td:first-child { box-shadow: inset 3px 0 0 #d9534f; }
.receber-tabela td:first-child { width: 2rem; }
@media (min-width: 992px) { .stat-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ==================== Relatórios ==================== */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.rel-card { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.rel-card:hover { border-color: #b7dcd8; box-shadow: 0 14px 30px -22px rgba(11, 63, 67, .6); color: var(--ink); }
.rel-card span:last-child { color: var(--ink-soft); font-size: .9rem; }
.rel-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--brand-dark); font-size: 1.25rem; margin-bottom: .3rem; }
.rel-tabela .table td, .rel-tabela .table th { font-size: .88rem; }
.rel-total td { font-weight: 700; border-top: 2px solid var(--ink-faint); background: var(--surface); }
.print-only { display: none; }
/* gráfico da análise anual — cores validadas (dataviz validate_palette, fundo branco): #008c82 × #eb6834 */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e6eeed; stroke-width: 1; }
.chart .baseline { stroke: #b9c7c5; stroke-width: 1; }
.chart .axis { fill: var(--ink-soft); font-size: 11px; font-family: inherit; }
.chart .bar-1 { fill: #008c82; }
.chart .bar-2 { fill: #eb6834; }
.chart .hit { fill: transparent; }
.chart g:hover .hit { fill: rgba(0, 140, 130, .06); }
.chart g:hover path { opacity: .85; }
.chart .futuro { opacity: .35; }
.chart-legend { display: flex; gap: 1rem; font-size: .85rem; color: var(--ink-soft); }
.chart-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.sw-1 { background: #008c82; } .sw-2 { background: #eb6834; }
@media print {
  @page relatorio { size: A4 landscape; margin: 10mm; }
  .app-body { background: #fff; page: relatorio; }
  .app-sidebar, .app-topbar, .app-footer, .no-print, .toast-container { display: none !important; }
  .app-content { padding: 0; max-width: none; }
  .print-only { display: block; }
  .panel { border: 0; padding: 0; margin-bottom: 4mm; }
  .rel-tabela .table td, .rel-tabela .table th { font-size: 8.5pt; padding: 1mm 1.5mm; }
  .table-cards thead { display: table-header-group !important; }
  .table-cards { display: table !important; }
  .table-cards tbody { display: table-row-group !important; }
  .table-cards tfoot { display: table-footer-group !important; }
  .table-cards tr { display: table-row !important; border: 0 !important; }
  .table-cards td { display: table-cell !important; }
  .table-cards td[data-label]::before { display: none !important; }
  .badge { border: 0; background: none !important; color: #000 !important; padding: 0; font-weight: 600; }
}
.rel-tabela .table-clean thead th { white-space: normal; vertical-align: bottom; }
