/* ============================================================
   CNPA Boleto · Design System "Maré" — componentes reutilizáveis
   Extraído do bundle Claude Design (ds.jsx, colonia-shell.jsx).
   Depende de tokens.css e mare.css.
   Fidelidade 100% ao bundle — não altere valores sem novo bundle.
   ============================================================ */

/* ============================================================
   BOTÕES
   ds.jsx: Button component — sizes sm/md/lg, variants 7
   ============================================================ */

/* Base comum a todos os botões */
.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  transition:
    filter var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
  /* tamanho padrão md */
  font-size: 15px;
  padding: 11px 17px;
  min-height: 44px;
  gap: 8px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--nevoa-200) !important;
  color: var(--nevoa-400) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

/* Tamanhos */
.btn-sm {
  font-size: 13.5px;
  padding: 8px 13px;
  min-height: 38px;
  gap: 7px;
}
.btn-lg {
  font-size: 16px;
  padding: 14px 20px;
  min-height: 52px;
  gap: 9px;
}
.btn-full { width: 100%; }

/* Variantes — ds.jsx Button.variants */
.btn-primary {
  background: var(--grad-mare);
  color: #fff;
  box-shadow: var(--shadow-mare);
}
.btn-primary:not(:disabled):hover {
  box-shadow: 0 16px 34px rgba(14, 124, 134, 0.36);
}

.btn-secondary {
  background: var(--areia-400);
  color: var(--mare-900);
  box-shadow: 0 6px 16px rgba(244, 162, 59, 0.28);
}
.btn-secondary:not(:disabled):hover {
  box-shadow: 0 10px 22px rgba(244, 162, 59, 0.34);
}

.btn-outline {
  background: #fff;
  color: var(--mare-700);
  box-shadow: inset 0 0 0 1.6px var(--mare-600);
}

.btn-neutral {
  background: #fff;
  color: var(--fg1);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn-neutral:not(:disabled):hover {
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--mare-700);
}

.btn-danger {
  background: var(--vencido-500);
  color: #fff;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.28);
}
.btn-danger:not(:disabled):hover {
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.34);
}

.btn-danger-outline {
  background: #fff;
  color: var(--vencido-600);
  box-shadow: inset 0 0 0 1.6px var(--vencido-500);
}

/* ============================================================
   BADGES DE STATUS
   ds.jsx: Badge component + STATUS map completo
   STATUS_ANIM: cnpa-ic-{draw,bob,sway,pulse,fade}
   ============================================================ */

.badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1;
}
.badge-sm { font-size: 11.5px; padding: 3px 9px; }
.badge-lg { font-size: 14px; padding: 7px 14px; }
/* Ícone do badge: size = fontSize + 2, stroke 2.4 (ds.jsx Badge, 179373fe.js:60-65).
   Sem dimensão explícita o lucide.createIcons renderiza no default 24px/stroke 2. */
.badge i, .badge svg { width: 14.5px; height: 14.5px; stroke-width: 2.4; }
.badge-sm i, .badge-sm svg { width: 13.5px; height: 13.5px; }
.badge-lg i, .badge-lg svg { width: 16px; height: 16px; }

/* STATUS mapa completo — ds.jsx STATUS object */
.badge-pago {
  background: var(--pago-50);
  color: var(--pago-600);
}
.badge-emdia {
  background: var(--mare-50);
  color: var(--mare-700);
}
.badge-aberto {
  background: var(--aberto-50);
  color: var(--aberto-600);
}
.badge-vencido {
  background: var(--vencido-50);
  color: var(--vencido-600);
}
.badge-cancelado {
  background: var(--nevoa-100);
  color: var(--nevoa-600);
}
.badge-contestacao {
  background: var(--contestacao-50);
  color: var(--contestacao-600);
}
.badge-ativo {
  background: var(--pago-50);
  color: var(--pago-600);
}
.badge-inativo {
  background: var(--nevoa-100);
  color: var(--nevoa-600);
}
.badge-inadimplente {
  background: var(--vencido-50);
  color: var(--vencido-600);
}
.badge-analise {
  background: var(--aberto-50);
  color: var(--aberto-600);
}
.badge-deferida {
  background: var(--pago-50);
  color: var(--pago-600);
}
.badge-indeferida {
  background: var(--vencido-50);
  color: var(--vencido-600);
}
.badge-pronto {
  background: var(--pago-50);
  color: var(--pago-600);
}
.badge-gerando {
  background: var(--mare-50);
  color: var(--mare-700);
}

/* ============================================================
   VALORES MONETÁRIOS
   ds.jsx: Money component, ds-money / ds-money-hero do tokens.css
   ============================================================ */

.money {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--fg1);
}
.money-hero {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--fg1);
  line-height: 1;
}

/* ============================================================
   CARD genérico
   ds.jsx: Card component — border, radius, shadow, hover lift
   ============================================================ */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}
.card-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  cursor: pointer;
}

/* ============================================================
   CAMPOS DE FORMULÁRIO
   ds.jsx: Field, Input, Select, Textarea, Label, Help
   ============================================================ */

.field { /* wrapper de campo — Field component */
  display: block;
}
.label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg1);
  margin-bottom: 7px;
  font-family: var(--font-sans);
}
.help {
  font-size: 12.5px;
  color: var(--fg3);
  margin: 6px 2px 0;
  line-height: 1.5;
  font-family: var(--font-sans);
}
.field-error {
  font-size: 12.5px;
  color: var(--vencido-600);
  font-weight: 600;
  margin: 6px 2px 0;
  line-height: 1.5;
  font-family: var(--font-sans);
}

/* Input base — ds.jsx fieldBase */
.input,
.select,
.textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 11px 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--fg1);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--mare-500);
  box-shadow: var(--shadow-focus);
}
.input-mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
.input-big {
  font-size: 18px;
  padding: 14px 15px;
}

/* Select — seta customizada */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B818C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 38px;
  cursor: pointer;
}
.textarea {
  resize: vertical;
  line-height: 1.5;
}

/* ============================================================
   CHIP / filtro
   ds.jsx: Chip component — active / inactive toggle
   ============================================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--fg2);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-fast);
}
.chip-active {
  border-color: var(--mare-500);
  background: var(--mare-50);
  color: var(--mare-700);
}
.chip:hover:not(.chip-active) {
  border-color: var(--nevoa-300);
  background: var(--nevoa-50);
}

/* ============================================================
   MODAL
   ds.jsx: Modal component — overlay petróleo translúcido
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 59, 71, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cnpaFade var(--dur-base) var(--ease-out);
}
.modal {
  background: #fff;
  border-radius: var(--radius-2xl);
  width: 460px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: cnpaPop var(--dur-base) var(--ease-out);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 0;
}
.modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mare-50);
  color: var(--mare-600);
}
.modal-icon-danger {
  background: var(--vencido-50);
  color: var(--vencido-600);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--mare-900);
  margin: 0;
  flex: 1;
}
.modal-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--fg3);
  padding: 4px;
  border-radius: 8px;
}
.modal-body {
  padding: 16px 22px 22px;
}
/* Rodapé de ações canônico — DINÂMICO (sem largura mágica nem breakpoint fixo).
   Resolve a causa raiz do clipping: botões forçados a 50/50 (btn-full) que matam
   o botão de rótulo longo. Aqui cada botão:
     - nunca encolhe abaixo do próprio conteúdo (min-width:max-content) → nunca corta
       (.cnpa-btn tem overflow:hidden + .btn é white-space:nowrap);
     - divide o espaço igualmente quando cabe (flex:1 1 0 → 50/50 como o bundle);
     - quebra para coluna sozinho quando não cabe (flex-wrap:wrap → full-width empilhado).
   Adapta-se a qualquer rótulo, qualquer modal e qualquer largura. */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions > .btn {
  flex: 1 1 0;
  min-width: max-content;
}

/* ============================================================
   TOAST
   ds.jsx: Toast component — fundo petróleo, ciano/status
   ============================================================ */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  background: var(--mare-900);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  animation: cnpaToast var(--dur-slow) var(--ease-out);
  white-space: nowrap;
}

/* ============================================================
   EMPTY STATE
   ds.jsx: EmptyState component — ícone + título + desc + ação
   ============================================================ */

.empty-state {
  padding: 52px 28px;
  text-align: center;
}
.empty-state-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--mare-50);
  color: var(--mare-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--mare-900);
  margin: 0;
}
.empty-state-desc {
  font-size: 14.5px;
  color: var(--fg2);
  margin: 10px auto 0;
  max-width: 360px;
  line-height: 1.55;
  font-family: var(--font-sans);
}
.empty-state-action {
  margin-top: 20px;
  display: inline-flex;
}

/* ============================================================
   KPI card de métrica
   colonia-shell.jsx: Kpi component — tone, icon, delta, sub
   ============================================================ */

.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}
.kpi-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  cursor: pointer;
}
.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.kpi-label {
  font-size: 13px;
  color: var(--fg2);
  font-weight: 600;
  font-family: var(--font-sans);
}
.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.kpi-value {
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.kpi-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
}
.kpi-delta-up {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--pago-600);
}
.kpi-delta-down {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--vencido-600);
}
.kpi-sub {
  color: var(--fg3);
}

/* Tones dos KPIs — colonia-shell.jsx Kpi.tones */
.kpi-tone-mare  .kpi-icon { background: var(--mare-50);   color: var(--mare-600);   }
.kpi-tone-pago  .kpi-icon { background: var(--pago-50);   color: var(--pago-600);   }
.kpi-tone-aberto .kpi-icon { background: var(--aberto-50); color: var(--aberto-600); }
.kpi-tone-vencido .kpi-icon { background: var(--vencido-50); color: var(--vencido-600); }
.kpi-tone-nevoa .kpi-icon { background: var(--nevoa-100); color: var(--nevoa-600);  }

/* ============================================================
   STATUS DOT (variante compacta para tabelas)
   ds.jsx: StatusDot component
   ============================================================ */

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  font-family: var(--font-sans);
}

/* ============================================================
   PAGE HEAD (cabeçalho de página Colônia)
   colonia-shell.jsx: PageHead component
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head-title-block {
  flex: 1;
  min-width: 240px;
}
.page-head-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  color: var(--mare-700);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  font-family: var(--font-sans);
  margin-bottom: 8px;
  padding: 0;
}
.page-head-eyebrow {
  margin-bottom: 5px;
}
.page-head-h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--mare-900);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-head-subtitle {
  font-size: 14.5px;
  color: var(--fg2);
  margin: 7px 0 0;
  line-height: 1.5;
  font-family: var(--font-sans);
}
.page-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   TABELA DENSA (Colônia)
   colonia-shell.jsx: Table, Tr, Td
   ============================================================ */

.table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-scroll {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
}
.table thead {
  background: var(--nevoa-50);
  border-bottom: 1px solid var(--border);
}
.table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg3);
  white-space: nowrap;
  position: sticky;
  top: 0;
  /* Acima das linhas ao rolar (badges/células com fundo passariam por cima);
     abaixo do header do shell (z-index: 30). */
  z-index: 10;
}
.table th[data-align="right"] { text-align: right; }
.table th[data-align="center"] { text-align: center; }
.table-th-sort { cursor: pointer; }
.table tr {
  border-bottom: 1px solid var(--nevoa-100);
  transition: background var(--dur-fast);
}
.table tr:last-child { border-bottom: 0; }
.table td {
  padding: 12px 16px;
  font-size: 13.5px;
  text-align: left;
  color: var(--fg1);
  font-weight: 500;
  white-space: nowrap;
}
.table td[data-align="right"] { text-align: right; }
.table td[data-align="center"] { text-align: center; }
.table-row-click { cursor: pointer; }
.table-row-click:hover { background: var(--nevoa-50); }
.table-row-selected { background: var(--mare-50); }
.td-mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
.td-bold { font-weight: 700; }

/* ============================================================
   ROLE SWITCH (Colônia — RBAC demo)
   colonia-shell.jsx: RoleSwitch component
   ============================================================ */

.role-switch {
  display: inline-flex;
  background: var(--nevoa-100);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.role-switch-btn {
  border: 0;
  cursor: pointer;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  background: transparent;
  color: var(--fg3);
  box-shadow: none;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.role-switch-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--mare-700);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   NAV BADGE (contador de contestações na sidebar)
   colonia-shell.jsx: Sidebar badge counter
   ============================================================ */

.nav-badge {
  background: var(--vencido-500);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-family: var(--font-sans);
}

/* ============================================================
   SKELETON (shimmer névoa)
   ds.jsx: Skeleton — usa cnpa-skel de mare.css
   ============================================================ */

/* .cnpa-skel já definido em mare.css — alias conveniente */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--nevoa-100) 25%,
    var(--nevoa-200) 37%,
    var(--nevoa-100) 63%
  );
  background-size: 200% 100%;
  animation: cnpaShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

/* ============================================================
   ATALHO (quick action) — card-botão de atalho
   colonia-1.jsx: AtalhoColonia (205-211)
   ============================================================ */
.atalho-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg1);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.atalho-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--mare-400);
}

/* ============================================================
   READONLY BANNER (papel Consulta) — colonia-1.jsx ReadOnlyBanner (214)
   display:flex via CLASSE (não inline): o Alpine x-show manipula style.display
   e apagaria um display:flex inline ao exibir, quebrando o layout do ícone.
   ============================================================ */
.readonly-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--mare-50);
  border: 1px solid var(--mare-100);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--mare-800);
  font-weight: 600;
}
.readonly-banner > svg,
.readonly-banner > [data-lucide] {
  flex: none;
  margin-top: 1px;
}
.atalho-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mare-50);
  color: var(--mare-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.atalho-card-label {
  flex: 1;
}
.atalho-card[aria-disabled="true"] {
  color: var(--nevoa-400);
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   DASHBOARD — linhas de "Pescadores que acumulam atrasos" + colunas
   colonia-1.jsx: Dashboard (172-200)
   ============================================================ */
/* Grade de 2 colunas (1.7fr / 1fr) que colapsa no mobile — equivalente ao
   componente <Cols> do bundle (ds.jsx:280). */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 1024px) {
  .dash-cols {
    grid-template-columns: 1.7fr 1fr;
  }
}
.dash-delinquent-row {
  transition: background var(--dur-fast) var(--ease-out);
}
.dash-delinquent-row:hover {
  background: var(--nevoa-50);
}
.dash-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vencido-50);
  color: var(--vencido-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}

/* ============================================================
   AVATAR DE INICIAIS — variante "maré" (listas)
   b3b2dfc0.js PescadoresLista (tabela 32 / card 38). A .dash-avatar
   vermelha fica reservada à inadimplência do dashboard.
   ============================================================ */
.ds-avatar {
  border-radius: 50%;
  background: var(--mare-50);
  color: var(--mare-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: none;
}

/* ============================================================
   BARRA DE SELEÇÃO EM LOTE — b3b2dfc0.js:45-53
   Surge quando há seleção e papel != consulta. O wrapper anima `max-height` +
   `opacity` para a barra aparecer devagar EMPURRANDO a lista para baixo; default
   colapsado (sem flash pré-Alpine). `visibility:hidden` no estado fechado tira os
   botões do foco por teclado e dos leitores de tela enquanto a barra está invisível.
   ============================================================ */
.bulk-bar-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  margin-bottom: 0;
  transition: max-height var(--dur-slow) var(--ease-out),
              opacity var(--dur-slow) var(--ease-out),
              visibility var(--dur-slow) var(--ease-out),
              margin-bottom var(--dur-slow) var(--ease-out);
}
/* Teto folgado: cobre a barra (1 linha) e o wrap dos botões no mobile. O overflow
   recorta durante o colapso; opacity + altura crescem juntas empurrando a lista. */
.bulk-bar-wrap.is-open {
  max-height: 200px;
  opacity: 1;
  visibility: visible;
  margin-bottom: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .bulk-bar-wrap { transition: none; }
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--mare-600);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 10px 16px;
}
.bulk-bar-count { font-weight: 700; font-size: 14px; }
.bulk-bar-spacer { flex: 1; }
/* "Exportar" é ghost: sobre o mare-600 o texto mare-700 sumiria → branco cirúrgico
   (porte literal do style={{color:'#fff'}}; NÃO altera o .btn-ghost global). */
.bulk-bar .btn-ghost { color: #fff; }

/* ============================================================
   LISTA — alternância tabela (desktop) × cards (mobile) — b3b2dfc0.js:55-75
   Troca em 820px (mesmo ponto do shell ColoniaShell).
   ============================================================ */
.list-desktop { display: block; }
.list-mobile { display: none; flex-direction: column; gap: 10px; }
@media (max-width: 820px) {
  .list-desktop { display: none; }
  .list-mobile { display: flex; }
}
.list-card-top { display: flex; align-items: center; gap: 11px; }
.list-card-name { font-size: 15px; font-weight: 700; color: var(--fg1); }
.list-card-sub { font-size: 12.5px; color: var(--fg3); font-family: var(--font-num); }
.list-card-badges { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; align-items: center; }
.list-card-cat { margin-left: auto; font-size: 12.5px; color: var(--fg3); align-self: center; }
.list-card-due {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 14px;
  color: var(--vencido-600);
  letter-spacing: -0.02em;
}
/* Checkbox custom do design system: substitui o <input> nativo por uma caixa
   estilizada (teal da marca) com tick animado ao marcar/desmarcar. appearance:none
   remove o visual nativo; o Alpine já controla :checked (sel.includes(pk) /
   allChecked), então a animação é só CSS — sem JS novo nem mudança de template. */
.list-checkbox,
.list-checkbox-lg {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  margin: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-elev);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease;
}
.list-checkbox-lg { width: 22px; height: 22px; border-radius: 7px; }

/* Tick desenhado via ::after — "pop" ao marcar, recolhe ao desmarcar. */
.list-checkbox::after,
.list-checkbox-lg::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.2, 0.85, 0.3, 1.4), opacity 0.14s ease;
}
.list-checkbox-lg::after { width: 11px; height: 6px; }

.list-checkbox:checked,
.list-checkbox-lg:checked {
  background: var(--mare-600);
  border-color: var(--mare-600);
}
.list-checkbox:checked::after,
.list-checkbox-lg:checked::after {
  transform: rotate(-45deg) scale(1);
  opacity: 1;
}

.list-checkbox:hover,
.list-checkbox-lg:hover { border-color: var(--mare-500); }
/* Feedback tátil: a caixa "afunda" levemente ao clicar. */
.list-checkbox:active,
.list-checkbox-lg:active { transform: scale(0.88); }
.list-checkbox:focus-visible,
.list-checkbox-lg:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--mare-200);
}
@media (prefers-reduced-motion: reduce) {
  .list-checkbox,
  .list-checkbox-lg,
  .list-checkbox::after,
  .list-checkbox-lg::after { transition: none; }
}
/* Hit-area do checkbox: a coluna INTEIRA alterna a seleção — na linha a <td> usa
   @click.stop="toggle()" (e o <input> idem); no cabeçalho o <th> usa
   @click.self="toggleAll()" (o <input> dispara via @change). Isso elimina a "zona
   morta" que disparava a navegação da row. Checkbox centralizado para a coluna toda
   parecer (e ser) clicável. */
.table .checkbox-cell { width: 52px; padding: 12px; text-align: center; cursor: pointer; }
.table .checkbox-cell .list-checkbox { cursor: pointer; }
/* Alvo de toque ampliado do checkbox no card mobile (margin negativa = sem deslocar). */
.checkbox-tap { display: inline-flex; align-items: center; padding: 8px; margin: -8px; cursor: pointer; }
/* Rodapé da lista (contador + paginação) — b3b2dfc0.js:102-108 */
.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--fg3);
}
.list-footer-pager { display: flex; gap: 6px; }
