:root {
  --brand: #2554e8;
  --brand-dark: #1a3fc4;
  --brand-soft: #eef2ff;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98a2b3;
  --border: #e4e7ec;
  --border-soft: #eef1f5;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #fafbfd;
  --success-bg: #ecfdf3;
  --success-ink: #027a48;
  --danger-bg: #fef3f2;
  --danger-ink: #b42318;
  --amber-ink: #b54708;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 6px rgba(16, 24, 40, 0.04);
  --shadow-pop: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.06);
  --shadow-bar: 0 -4px 16px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 2px 6px rgba(37, 84, 232, 0.35);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 1.4rem;
  margin: 0 auto;
}
.topbar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.topbar .brand-text strong { font-size: 1rem; color: var(--ink); font-weight: 650; }
.topbar .brand-text span { font-size: 0.78rem; color: var(--ink-faint); }

.admin-access-btn {
  margin-left: auto;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.admin-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.admin-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.active { color: var(--brand); }
.admin-nav button { padding: 0.4rem 0.9rem; font-size: 0.82rem; }

/* ---------- Tool hub ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
  border-color: var(--brand);
}
.tool-card .tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.tool-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.tool-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 320px);
}
.login-box { width: 100%; max-width: 400px; }
.login-brand { text-align: center; margin-bottom: 1.75rem; }
.login-brand h1 { margin: 1.1rem 0 0.25rem; font-size: 1.4rem; }
.login-brand .subtitle { color: var(--ink-soft); font-size: 0.88rem; }
.login-back { text-align: center; margin-top: 1.25rem; }
.login-back a { color: var(--ink-soft); font-size: 0.86rem; text-decoration: none; }
.login-back a:hover { color: var(--ink); }

/* ---------- Page shell ---------- */
.page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 2.25rem 2.5rem 6rem;
}
.page.narrow { max-width: 880px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
  color: var(--ink);
}
.page-head .subtitle { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}
.card > h2, .card > h3 { margin-top: 0; }

/* ---------- Invoice meta strip ---------- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem 1.75rem;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
}
.meta-grid .field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-bottom: 0.25rem;
  font-weight: 650;
}
.meta-grid .field div {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 550;
}

.meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.5rem; }
.meta span { display: inline-block; margin-right: 1.5rem; }

/* ---------- Stat tiles ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.stat-tile label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.stat-tile .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-tile.accent {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
}
.stat-tile.accent label { color: rgba(255,255,255,0.75); }
.stat-tile.accent .value { color: #fff; }

/* ---------- Table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: var(--surface);
}
th, td {
  padding: 0.6rem 0.65rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
th {
  background: var(--surface-alt);
  text-align: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  font-weight: 650;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
th .grp {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.2rem;
  opacity: 0.75;
}
th.grp-icms .grp, th.g-icms { color: var(--brand-dark); }
th.grp-ipi .grp, th.g-ipi { color: var(--amber-ink); }
th.grp-piscofins .grp { color: #6941c6; }
th.grp-icmsst .grp { color: var(--danger-ink); }
th.grp-ibscbs .grp, th.g-ibscbs { color: var(--success-ink); }
th.grp-start, td.grp-start { border-left: 1px solid var(--border); }

td.desc, th.desc { text-align: left; white-space: normal; }
td.desc { max-width: 280px; }
td { font-variant-numeric: tabular-nums; color: var(--ink); }
tbody tr:hover { background: var(--surface-alt); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.is-active { background: var(--brand-soft); }
tbody tr.is-active:hover { background: var(--brand-soft); }

.prod-name {
  font-weight: 550;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-sub { display: block; font-size: 0.76rem; color: var(--ink-faint); margin-top: 0.2rem; font-weight: 400; }

.pct-badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
}

/* ---------- Inputs ---------- */
input[type=text], input[type=number], input[type=password] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=number]:focus, input[type=password]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.qty-input { width: 5.5rem; text-align: right; font-weight: 650; }
.qty-input:disabled { background: var(--surface-alt); color: var(--ink-faint); cursor: not-allowed; }
label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 550; }

.field-block { margin-bottom: 1.5rem; }
.field-block label { display: block; margin-bottom: 0.4rem; }
.field-block input { max-width: 420px; }

/* ---------- Buttons ---------- */
button, .btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-dark); }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  box-shadow: none;
}
button.secondary:hover, .btn.secondary:hover { background: var(--surface-alt); color: var(--ink); }
button.danger, .btn.danger {
  background: var(--surface);
  color: var(--danger-ink);
  border: 1px solid var(--border);
  box-shadow: none;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
button.danger:hover { background: var(--danger-bg); border-color: #fda29b; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.error, .success {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.error { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid #fda29b; }
.success { background: var(--success-bg); color: var(--success-ink); border: 1px solid #6ce9a6; }
.success .link-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem; }

.small { font-size: 0.8rem; color: var(--ink-faint); }
.totals td { font-weight: 700; background: var(--surface-alt); color: var(--ink); }
.totals td.grand { color: var(--brand-dark); font-size: 0.95rem; }

/* ---------- Upload dropzone ---------- */
.dropzone {
  border: 1.5px dashed #c7cee0;
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--surface-alt);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .icon {
  width: 44px; height: 44px; margin: 0 auto 0.75rem;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.dropzone p { margin: 0 0 1rem; color: var(--ink-soft); font-size: 0.9rem; }
.dropzone input[type=file] { max-width: 340px; margin: 0 auto 1rem; display: block; }

/* ---------- Token / link chip ---------- */
a.link-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  text-decoration: none;
  word-break: break-all;
}
a.link-token:hover { border-color: var(--brand); }

.copy-btn {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.copy-btn:hover { background: var(--surface-alt); color: var(--ink); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

/* ---------- Not found ---------- */
.center-card {
  max-width: 460px;
  margin: 4.5rem auto;
  text-align: center;
}
.center-card .icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  border-radius: 14px;
  background: var(--danger-bg);
  color: var(--danger-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}

/* ---------- Sticky summary bar ---------- */
.summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-bar);
  z-index: 20;
}
.summary-bar .inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0.9rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.summary-bar .figures {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.summary-bar .figures div { text-align: left; }
.summary-bar .figures label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  font-weight: 650;
  margin-bottom: 0.15rem;
}
.summary-bar .figures .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.summary-bar .figures .value.accent { color: var(--brand-dark); }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .topbar, .no-print, .summary-bar { display: none; }
  .page { padding: 0; max-width: 100%; }
  .card { box-shadow: none; border: none; padding: 0; }
  .table-scroll { border: none; }
  th { position: static; }
  .prod-name { -webkit-line-clamp: unset; }
  td.desc { max-width: none; }
}

@media (max-width: 900px) {
  .page { padding: 1.5rem 1.25rem 5rem; }
  .card { padding: 1.1rem 1.1rem; }
  .topbar { padding: 0.85rem 1.25rem; }
  .summary-bar .inner { padding: 0.85rem 1.25rem; }
}

/* ==========================================================================
   DANFE-style support document (report.ejs "modelo" view)
   Deliberately mimics the classic boxed DANFE layout for familiarity, but is
   NOT a fiscal document — no barcode, no document number, watermarked and
   labeled throughout as a calculation aid only.
   ========================================================================== */
.danfe-wrap {
  background: var(--bg);
  padding: 1.5rem 0 3rem;
}
.danfe {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  line-height: 1.3;
  border: 1.5px solid #000;
  overflow: hidden;
}
.danfe-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.danfe-watermark span {
  display: block;
  white-space: nowrap;
  font-size: 5.5rem;
  font-weight: 800;
  color: rgba(200, 30, 30, 0.08);
  transform: rotate(-28deg);
  letter-spacing: 0.05em;
}
.danfe-banner {
  position: relative;
  z-index: 1;
  background: #fff3cd;
  border-bottom: 2px solid #000;
  color: #7a4a00;
  font-weight: 800;
  text-align: center;
  padding: 6px 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.danfe-banner small {
  display: block;
  font-weight: 600;
  font-size: 8.5px;
  letter-spacing: 0;
  margin-top: 1px;
}
.danfe-section {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid #000;
}
.danfe-row {
  display: flex;
  border-bottom: 1px solid #000;
}
.danfe-row:last-child { border-bottom: none; }
.danfe-cell {
  flex: 1;
  border-right: 1px solid #000;
  padding: 3px 6px;
  min-width: 0;
}
.danfe-cell:last-child { border-right: none; }
.danfe-cell.grow-2 { flex-grow: 2; }
.danfe-cell.grow-3 { flex-grow: 3; }
.danfe-cell label {
  display: block;
  font-size: 6.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #333;
  margin-bottom: 1px;
}
.danfe-cell .val {
  font-size: 10px;
  font-weight: 600;
  word-break: break-word;
}
.danfe-cell .val.small { font-size: 8.5px; font-weight: 400; }
.danfe-title-block {
  flex: 0 0 190px;
  text-align: center;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.danfe-title-block strong { font-size: 13px; display: block; }
.danfe-title-block span { font-size: 7px; display: block; }
.danfe-calc-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.danfe-calc-grid .danfe-cell { border-bottom: 1px solid #000; }
.danfe-calc-grid .danfe-cell:nth-child(6n) { border-right: none; }
.danfe-calc-grid .danfe-cell.total {
  background: #eef2ff;
}
.danfe-calc-grid .danfe-cell.total .val { font-size: 12px; }
.danfe-table-wrap { position: relative; z-index: 1; overflow-x: auto; }
.danfe table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}
.danfe th, .danfe td {
  border: 1px solid #000;
  padding: 2px 4px;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}
.danfe th {
  background: #f0f0f0;
  font-size: 6.8px;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}
.danfe td.desc, .danfe th.desc { text-align: left; white-space: normal; max-width: 220px; }
.danfe-adic {
  position: relative;
  z-index: 1;
  padding: 6px 8px;
  font-size: 8px;
}
.danfe-adic label {
  display: block;
  font-size: 7px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 3px;
}
.danfe-adic p { margin: 0 0 6px; }
.danfe-actions {
  max-width: 1000px;
  margin: 1rem auto 0;
  display: flex;
  gap: 0.75rem;
}

@media print {
  .danfe-wrap { padding: 0; background: #fff; }
  .danfe { border-width: 1px; max-width: 100%; }
  .danfe-watermark span { color: rgba(200, 30, 30, 0.12); }
}

@media (max-width: 700px) {
  .danfe-row { flex-wrap: wrap; }
  .danfe-row .danfe-cell { flex: 1 1 45%; border-bottom: 1px solid #000; }
  .danfe-calc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Auditor Fiscal ---------- */
.auditor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .auditor-grid { grid-template-columns: 1fr; }
}
.xml-textarea {
  width: 100%;
  min-height: 320px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink);
  resize: vertical;
}
.xml-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.issue-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.issue {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.45;
}
.issue-erro { background: var(--danger-bg); color: var(--danger-ink); }
.issue-alerta { background: #fffaeb; color: var(--amber-ink); }
.issue-badge {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
}

.product-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
}
.product-card summary {
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.product-card summary .small { color: var(--ink-faint); }
.tax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.tax-box {
  background: var(--bg-subtle, #f7f7f8);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}
.tax-box h4 {
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.conf-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.conf-alta { background: var(--success-bg, #e6f4ea); color: var(--success-ink, #1e7e34); }
.conf-estimativa { background: #fffaeb; color: var(--amber-ink); }
.conf-indisponivel { background: rgba(0,0,0,0.08); color: var(--ink-faint); }
