/* Reset + base */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #f3f4f6; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #111827; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* Cores semânticas */
:root {
  --emdia: #16a34a; --emdia-bg: #dcfce7;
  --aviso: #eab308; --aviso-bg: #fef9c3; --aviso-fg: #854d0e;
  --vencido: #dc2626; --vencido-bg: #fee2e2;
  --info: #3b82f6; --info-bg: #dbeafe;
  --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db;
  --gray-400: #9ca3af; --gray-500: #6b7280; --gray-700: #374151;
  --brand: #2563eb;
}

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.btn { min-height: 44px; border: none; border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 16px; transition: filter .15s; }
.btn:active { filter: brightness(.9); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-aviso { background: var(--aviso); color: #fff; }
.btn-vencido { background: var(--vencido); color: #fff; }
.btn-emdia { background: var(--emdia); color: #fff; }
.btn-ghost { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-block { width: 100%; }
.btn:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }

.card { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--gray-200); }
.card-aviso { border: 2px solid color-mix(in oklab, var(--aviso) 40%, transparent); }
.card-vencido { border: 2px solid color-mix(in oklab, var(--vencido) 50%, transparent); }

/* Loading */
.spinner { width: 40px; height: 40px; border: 4px solid var(--gray-200); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 18px; border-radius: 24px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 9999; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }
.toast.error { background: var(--vencido); }
.toast.success { background: var(--emdia); }
