/* ==========================================================================
   NFS-e Captura — Design System (SaaS, tema claro)
   Tokens semânticos + compatibilidade com nomes antigos (--bad, --ok...).
   ========================================================================== */

:root {
  /* Paleta base */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e7e9ee;
  --border-strong: #d6dae1;

  --text: #111827;
  --text-2: #475467;
  --muted-c: #8a93a3;

  /* Marca / semânticas */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-on: #ffffff;

  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --info: #1d4ed8;
  --info-soft: #dbeafe;

  /* Escala */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 10px 24px rgba(16, 24, 40, .10);
  --sidebar-w: 248px;

  /* Compatibilidade com nomes antigos usados no HTML/JS */
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --line: var(--border);
  --brand: var(--primary);
  --ok: var(--success);
  --warn: var(--warning);
  --bad: var(--danger);
  --muted: var(--muted-c);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }

.muted { color: var(--muted-c); }
.num { font-variant-numeric: tabular-nums; }

/* ============================ App shell ============================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100dvh;
}

.sidebar {
  background: #0f1320;
  color: #c7cdd9;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100dvh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #7c73ff);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .45);
}

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; padding: 14px 8px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: #c7cdd9; font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active:hover { background: var(--primary-hover); }
.nav-item svg { width: 18px; height: 18px; flex: none; }

/* Grupo recolhível do menu lateral (ex.: módulo "Configuração") */
.nav-group > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-item svg.nav-caret { width: 15px; height: 15px; margin-left: auto; transition: transform .15s; }
.nav-group[open] > summary svg.nav-caret { transform: rotate(180deg); }
.nav-sub {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 2px 19px; border-left: 1px solid rgba(255,255,255,.10);
}
.nav-sub .nav-item { padding-left: 18px; }

.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #2a3142; color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}
.sidebar-user .who { font-size: 13px; color: #fff; line-height: 1.2; }
.sidebar-user .who small { color: #8a93a3; }

/* ============================ Main ============================ */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(246,247,249,.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; letter-spacing: -.01em; }
.topbar .sub { font-size: 13px; color: var(--muted-c); margin-top: 2px; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }

.content { padding: 24px 28px 40px; max-width: 1280px; width: 100%; }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary, button.primario {
  background: var(--primary); border-color: var(--primary); color: var(--primary-on);
  box-shadow: 0 1px 2px rgba(79,70,229,.35);
  height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: filter .15s, transform .05s;
}
.btn-primary:hover, button.primario:hover { filter: brightness(1.06); text-decoration: none; }
.btn-primary:active, button.primario:active { transform: translateY(1px); }
.btn-primary:disabled, button.primario:disabled { opacity: .6; cursor: not-allowed; }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* ============================ Cards (métricas) ============================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.card .rotulo, .card .card-label { color: var(--text-2); font-size: 13px; font-weight: 500; }
.card .valor, .card .card-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card .card-ico {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.card .card-ico svg { width: 18px; height: 18px; }
.card.ok .card-ico { background: var(--success-soft); color: var(--success); }
.card.money .card-ico { background: var(--info-soft); color: var(--info); }
.card.warn .card-ico { background: var(--warning-soft); color: var(--warning); }

/* ============================ Painéis ============================ */
.grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1024px) { .grid-2 { grid-template-columns: 1fr; } }

.bloco, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.bloco h2, .panel h2 {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px;
}

/* Top fornecedores */
.forn { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.forn:last-child { border-bottom: 0; }
.forn .nome { font-size: 14px; font-weight: 500; }
.forn .cnpj { color: var(--muted-c); font-size: 12px; margin-top: 2px; }
.forn .total { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================ Filtros + inputs ============================ */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

input, select {
  height: 38px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input[type="file"] { padding: 7px 11px; height: auto; }
input::placeholder { color: var(--muted-c); }
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ============================ Tabela ============================ */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; font-weight: 600; color: var(--text-2);
  font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
thead th:first-child { border-top-left-radius: var(--radius-sm); }
thead th:last-child { border-top-right-radius: var(--radius-sm); }
tbody td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.valor { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table thead th { background: var(--surface-2); }

/* Badges de status */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ativa { background: var(--success-soft); color: var(--success); }
.tag.cancelada { background: var(--danger-soft); color: var(--danger); }
.tag.substituida { background: var(--warning-soft); color: var(--warning); }

/* Botões de download (XML / PDF) na tabela */
.btn-file {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); font-size: 12px; font-weight: 600;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.btn-file:hover { background: var(--surface-2); text-decoration: none; }
.btn-file svg { width: 13px; height: 13px; }
.btn-file + .btn-file { margin-left: 6px; }
/* Acoes da tabela DFe: XML/PDF/Manifestar/Vinculos sempre na mesma linha e alinhados. */
.acoes-dfe { display: flex; align-items: center; flex-wrap: nowrap; }
.btn-file.xml:hover { color: var(--info); border-color: var(--info); }
.btn-file.pdf:hover { color: var(--danger); border-color: var(--danger); }

/* Indicador de origem (nota importada do e-mail) */
.origem-email {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  background: var(--info-soft); color: var(--info); margin-left: 6px;
}
.origem-email svg { width: 12px; height: 12px; }

/* Indicador de boleto anexado */
.origem-boleto {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  background: var(--warning-soft); color: var(--warning); margin-left: 6px;
}
.btn-file.boleto:hover { color: var(--warning); border-color: var(--warning); }

/* ============================ Mensagens ============================ */
.msg { margin-top: 14px; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.msg.ok { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.msg.erro { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

.acoes-linha a { margin-right: 12px; font-weight: 500; }

.link-subst { font-weight: 700; text-decoration: none; padding: 0 4px; }
.link-subst:hover { text-decoration: none; }

/* Banner de alerta (certificado vencendo) */
.alerta-cert {
  display: none; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 18px; font-size: 14px; font-weight: 500; border: 1px solid transparent;
}
.alerta-cert svg { width: 18px; height: 18px; flex: none; }
.alerta-cert a { color: inherit; text-decoration: underline; font-weight: 700; }
.alerta-cert.vence_breve { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.alerta-cert.vencido { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

/* Atividade em segundo plano */
.atividade-linha { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-c); flex: none; }
.dot.run { background: var(--success); animation: pulsa 1.2s infinite; }
.dot.pdf { background: var(--info); animation: pulsa 1.2s infinite; }
@keyframes pulsa { 0% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
.barra { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.barra-fill { height: 100%; width: 0; background: var(--primary); transition: width .3s ease; }

/* ============================ Modal ============================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 19, 32, .55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  animation: modal-in .16s ease-out;
}
/* Variante larga — modal com mais conteúdo (tabelas, formulários extensos). */
.modal.modal--wide { max-width: 960px; }
@keyframes modal-in { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.modal-head h3 { font-size: 15px; }
.modal-close { background: none; border: 0; cursor: pointer; color: var(--muted-c); font-size: 22px; line-height: 1; padding: 0 6px; border-radius: 6px; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 8px 18px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-2); }
.kv .v { font-weight: 600; text-align: right; }

@keyframes flash-row { 0% { background: var(--primary-soft); } 100% { background: transparent; } }
tr.destacar td { animation: flash-row 2.4s ease-out; }

/* ============================ Login ============================ */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 50% -10%, #eef2ff 0%, var(--bg) 55%); }
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; width: 380px; box-shadow: var(--shadow-lg);
}
.login-card .brand { color: var(--text); padding: 0 0 20px; justify-content: center; }
.login-card h1 { font-size: 19px; margin: 0 0 4px; text-align: center; }
.login-card .lead { text-align: center; color: var(--muted-c); font-size: 13px; margin: 0 0 22px; }
.login-card label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 14px 0 6px; }
.login-card input { width: 100%; }
.login-card button { width: 100%; margin-top: 22px; height: 42px; justify-content: center; }

/* ============================ Form (onboarding) ============================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-grid input, .form-grid select { width: 100%; }
.col-full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.page-title { margin-bottom: 18px; }
.page-title h2 { font-size: 17px; }
.page-title p { color: var(--muted-c); margin: 4px 0 0; font-size: 13px; }

.section-gap { margin-top: 22px; }

/* ============================ Responsivo ============================ */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; width: 240px;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .topbar { padding: 14px 18px; }
  .content { padding: 18px; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }

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

/* ============================ Popup de captura ============================ */
.popup-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15, 19, 32, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.popup-overlay.open { display: flex; animation: popup-fade .15s ease-out; }
@keyframes popup-fade { from { opacity: 0; } to { opacity: 1; } }

.popup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 400px; padding: 32px 28px 26px;
  text-align: center;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  animation: popup-in .24s cubic-bezier(.22, 1, .36, 1);
}
@keyframes popup-in {
  from { transform: translateY(14px) scale(.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.popup-icon {
  width: 76px; height: 76px; margin: 0 auto 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--success-soft);
}
.popup-card.erro .popup-icon { background: var(--danger-soft); }
.popup-icon svg { width: 46px; height: 46px; }

.popup-check circle {
  stroke: var(--success); stroke-width: 2.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: popup-circle .5s ease-out forwards;
}
.popup-check path {
  stroke: var(--success); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: popup-draw .35s .4s ease-out forwards;
}
.popup-card.erro .popup-check circle,
.popup-card.erro .popup-check path { stroke: var(--danger); }
@keyframes popup-circle { to { stroke-dashoffset: 0; } }
@keyframes popup-draw   { to { stroke-dashoffset: 0; } }

.popup-titulo { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.popup-sub { color: var(--text-2); font-size: 14px; margin: 6px 0 0; }

.popup-stats { display: flex; gap: 12px; justify-content: center; margin: 20px 0 4px; }
.popup-stats:empty { display: none; }
.popup-stat {
  flex: 1; max-width: 140px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 8px;
}
.popup-stat .n {
  font-size: 26px; font-weight: 700; line-height: 1.1;
  color: var(--primary); font-variant-numeric: tabular-nums;
}
.popup-stat .l { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* Fixos: nunca encolhem nem somem (botão sempre clicável). */
.popup-icon, .popup-titulo, .popup-sub, .popup-stats { flex-shrink: 0; }

/* Lista de detalhes: única área que rola quando o conteúdo passa da tela. */
.popup-extra {
  font-size: 12.5px; margin: 14px 0 0;
  white-space: pre-line; text-align: left;
  overflow-wrap: anywhere;
  flex: 0 1 auto; min-height: 0; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.popup-card .btn-primary {
  width: 100%; justify-content: center; height: 42px;
  margin-top: 22px; flex-shrink: 0;
}

/* Telas baixas: comprime o cabeçalho para sobrar espaço (e o botão). */
@media (max-height: 560px) {
  .popup-card { padding: 22px 22px 20px; }
  .popup-icon { width: 54px; height: 54px; margin-bottom: 12px; }
  .popup-icon svg { width: 32px; height: 32px; }
  .popup-stats { margin: 12px 0 2px; }
  .popup-card .btn-primary { margin-top: 16px; }
}
/* Telas estreitas: menos respiro nas bordas do overlay. */
@media (max-width: 420px) {
  .popup-overlay { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .popup-check circle, .popup-check path { animation: none; stroke-dashoffset: 0; }
}

/* ====================================================================
   ABAS (tab navigation) — usado em /onboarding e /configuracoes
   ==================================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tab {
  padding: 12px 22px;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-c);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  transition: color .15s, border-color .15s, background .15s;
  margin-bottom: -1px;
}
.tab:hover {
  color: var(--text);
  background: var(--surface-2);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Pill colorida pra dias ate vencimento de certificado */
.pill-validade {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-validade.ok      { background: #dcfce7; color: #166534; }
.pill-validade.alerta  { background: #fef9c3; color: #854d0e; }
.pill-validade.urgente { background: #fee2e2; color: #991b1b; }
.pill-validade.vencido { background: #1f2937; color: #f9fafb; }
