/* ============================================================
   TMB Dashboard Uélicon — main.css
   Light mode. Inter + tabular-nums. Sem gradientes, sem glow.
   v1.0 — 2026-05-07
   Importa tokens.css. Não duplicar tokens aqui.
   ============================================================ */

@import url('./tokens.css');

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100svh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

p {
  margin: 0;
}

/* gotcha F4: Alpine cloak */
[x-cloak] {
  display: none !important;
}

/* SR-only utilitário para acessibilidade (texto que só leitor de tela vê) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   LAYOUT — Header + container
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}
.app-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

/* Monograma U + nome */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
}
.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  letter-spacing: 0;
}
.brand__name {
  display: inline-block;
}

.app-header__spacer {
  flex: 1;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  color: var(--text-secondary);
}
.sync-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--status-success-dot);
}
.sync-indicator--warn .sync-indicator__dot {
  background: var(--status-warning-dot);
}
.sync-indicator--warn {
  color: var(--status-warning-fg);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  color: var(--text-body);
  font-size: var(--text-base);
}
.user-chip__avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--neutral-200);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.user-chip__name {
  display: inline;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-6);
}

.page-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-1);
}
.page-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: 40px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  border: 1px solid transparent;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  height: 44px;
}
.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn--secondary {
  background: var(--surface-card);
  color: var(--text-body);
  border-color: var(--border-default);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text-body);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--surface-subtle);
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-body);
}
.btn--icon:hover:not(:disabled) {
  background: var(--surface-subtle);
}
.btn--icon svg {
  width: 18px;
  height: 18px;
}

.btn--full {
  width: 100%;
}

/* ============================================================
   FORM (login)
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  font-size: var(--text-md);
  color: var(--text-body);
  transition: border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}
.input::placeholder {
  color: var(--text-tertiary);
}
.input:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.input--error {
  border-color: var(--red-500);
}

.error-banner {
  background: var(--status-danger-bg);
  color: var(--status-danger-fg);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-base);
  border: 1px solid var(--red-100);
}
.error-banner--inline {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  background: transparent;
  border: 0;
  color: var(--status-danger-fg);
  padding: 0;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--surface-page);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.login-brand__mark {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--text-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
}
.login-brand__title {
  font-size: var(--text-lg);
  color: var(--text-primary);
}
.login-brand__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.login-foot {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ============================================================
   KPI cards (4 grid)
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}
.kpi-card:hover {
  border-color: var(--border-strong);
}
.kpi-card:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.kpi-card--positive {
  background: var(--kpi-positive-bg);
}
.kpi-card--negative {
  background: var(--kpi-negative-bg);
}
.kpi-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.kpi-card__value {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  line-height: var(--leading-tight);
}
.kpi-card--positive .kpi-card__value {
  color: var(--kpi-positive-fg);
}
.kpi-card--negative .kpi-card__value {
  color: var(--kpi-negative-fg);
}
.kpi-card__meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.kpi-card__warn {
  font-size: var(--text-xs);
  color: var(--status-danger-fg);
  font-weight: var(--weight-medium);
}

/* ============================================================
   SECTION (gráfico, tabela, atrasados)
   ============================================================ */
.section {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}
.section__head {
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
}
.section__title {
  font-size: var(--text-lg);
}
.section__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}
.section__body {
  padding: var(--space-5) var(--space-6);
}

/* Chart container */
.chart-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}
@media (max-width: 768px) {
  .chart-wrap {
    height: 220px;
  }
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.chart-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ============================================================
   FILTROS (chip-bar)
   ============================================================ */
.filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-body);
  cursor: pointer;
}
.filter-chip:hover {
  background: var(--surface-subtle);
}
.filter-chip:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.filter-chip--active {
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  border-color: var(--accent);
}
.filter-select {
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  font-size: var(--text-sm);
  color: var(--text-body);
  font-family: inherit;
  cursor: pointer;
  min-width: 160px;
}
.filter-select:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.filter-search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}
.filter-search input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-3) 0 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  font-size: var(--text-sm);
  color: var(--text-body);
  font-family: inherit;
}
.filter-search input:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.filter-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* ============================================================
   TABELA pedidos
   ============================================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  color: var(--text-body);
}
.table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table tbody tr {
  transition: background var(--motion-fast) var(--ease-standard);
  cursor: pointer;
}
.table tbody tr:hover {
  background: var(--surface-subtle);
}
.table tbody tr:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
  background: var(--surface-subtle);
}
.table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.table .col-center {
  text-align: center;
}
.table .col-right {
  text-align: right;
}
.cell-strong {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.cell-meta {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}
.cell-overdue {
  color: var(--status-danger-fg);
  font-weight: var(--weight-medium);
}
.tabnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Empty / loading / error */
.empty-state,
.error-state,
.loading-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.empty-state__title {
  display: block;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--text-body);
  margin-bottom: var(--space-2);
}

.skeleton-row {
  height: 44px;
  background: linear-gradient(
    90deg,
    var(--neutral-100) 0%,
    var(--neutral-200) 50%,
    var(--neutral-100) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-bottom: 1px solid var(--border-subtle);
}
@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-row {
    animation: none;
    background: var(--neutral-100);
  }
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
}
.badge--success {
  background: var(--status-success-bg);
  color: var(--status-success-fg);
}
.badge--success .badge__dot {
  background: var(--status-success-dot);
}
.badge--danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-fg);
}
.badge--danger .badge__dot {
  background: var(--status-danger-dot);
}
.badge--warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-fg);
}
.badge--warning .badge__dot {
  background: var(--status-warning-dot);
}
.badge--neutral {
  background: var(--status-neutral-bg);
  color: var(--status-neutral-fg);
}
.badge--neutral .badge__dot {
  background: var(--status-neutral-dot);
}
.badge--info {
  background: var(--status-info-bg);
  color: var(--status-info-fg);
}
.badge--info .badge__dot {
  background: var(--status-info-dot);
}
.badge--mini {
  height: 18px;
  padding: 0 var(--space-2);
  font-size: 11px;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.pagination__nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-body);
  font-size: var(--text-sm);
}
.pagination__btn:hover:not(:disabled) {
  background: var(--surface-subtle);
}
.pagination__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   SEÇÃO ATRASADOS
   ============================================================ */
.overdue-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.overdue-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface-card);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard);
}
.overdue-item:hover {
  background: var(--surface-subtle);
  border-color: var(--border-default);
}
.overdue-item:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.overdue-item__rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--red-100);
  color: var(--red-700);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.overdue-item__main {
  flex: 1;
  min-width: 0;
}
.overdue-item__name {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  font-size: var(--text-base);
}
.overdue-item__meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.overdue-item__value {
  font-weight: var(--weight-semibold);
  color: var(--status-danger-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   DRAWER
   ============================================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0% 0 0 / 0.4);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--ease-standard);
}
.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-width);
  max-width: 100vw;
  background: var(--surface-card);
  z-index: var(--z-drawer);
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform var(--motion-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.drawer.is-open {
  transform: translateX(0);
}
@media (max-width: 640px) {
  .drawer {
    width: 100vw;
  }
}
.drawer__head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--surface-card);
}
.drawer__title {
  font-size: var(--text-lg);
  margin: 0;
}
.drawer__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.drawer__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.drawer__section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}
.kv-list {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-base);
}
.kv-list dt {
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
}
.kv-list dd {
  margin: 0;
  color: var(--text-body);
}
.parcela-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.parcela-row {
  display: grid;
  grid-template-columns: 24px 64px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.parcela-row:last-child {
  border-bottom: 0;
}
.parcela-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--neutral-400);
  margin: 0 auto;
}
.parcela-row--paga .parcela-row__dot {
  background: var(--status-success-dot);
}
.parcela-row--em-aberto .parcela-row__dot {
  background: var(--status-warning-dot);
}
.parcela-row--atrasada .parcela-row__dot {
  background: var(--status-danger-dot);
}
.parcela-row--pendente .parcela-row__dot {
  background: var(--neutral-400);
}
.parcela-row__num {
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.parcela-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.parcela-row__main b {
  color: var(--text-body);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}
.parcela-row__main span {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.timeline__item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: var(--space-2);
}
.timeline__icon {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-200);
  color: var(--text-tertiary);
  font-size: 10px;
}
.timeline__item--ok .timeline__icon {
  background: var(--green-100);
  color: var(--green-700);
}
.timeline__item--em-aberto .timeline__icon {
  background: var(--amber-100);
  color: var(--amber-700);
}
.timeline__label {
  color: var(--text-body);
  font-weight: var(--weight-medium);
}
.timeline__date {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xs);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-stack {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 360px;
  pointer-events: none;
}
.toast {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-md);
  font-size: var(--text-sm);
  color: var(--text-body);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  pointer-events: auto;
}
.toast--success {
  border-color: var(--green-200);
  background: var(--green-50);
  color: var(--green-700);
}
.toast--error {
  border-color: var(--red-100);
  background: var(--red-50);
  color: var(--red-700);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: var(--space-4);
  }
  .app-header__inner {
    padding: 0 var(--space-4);
  }
  .brand__name {
    display: none;
  }
  .user-chip__name {
    display: none;
  }
  .table thead th:nth-child(2),
  .table tbody td:nth-child(2) {
    display: none; /* Esconder coluna telefone */
  }
  .section__head {
    padding: var(--space-4);
  }
  .section__body {
    padding: var(--space-4);
  }
}
