/* Design system inspirado no shadcn/ui (tema light, base zinc).
   Sobrescreve o tema "light" do DaisyUI com os tokens do shadcn e ajusta os componentes usados nas telas. */

/* Inter servida pelo próprio site (variável, pesos 400-700; só o latim, que cobre o português). */
/* optional (e não swap): se a fonte não chegar logo, a página fica com a fonte do sistema até o fim, sem trocar no
   meio. A troca mudava a quebra das linhas e empurrava os botões (no celular, o toque caía fora do botão). */
@font-face {
    font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: optional;
    src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

html[data-theme="light"] {
    --background: #ffffff;
    --foreground: #09090b;
    --card: #ffffff;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --ring: #a1a1aa;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --accent: #f4f4f5;
    --destructive: #dc2626;

    --color-base-100: var(--background);
    --color-base-200: var(--muted);
    --color-base-300: #e4e4e7;
    --color-base-content: var(--foreground);
    --color-primary: var(--primary);
    --color-primary-content: var(--primary-foreground);
    --color-secondary: var(--muted);
    --color-secondary-content: var(--foreground);
    --color-neutral: var(--primary);
    --color-neutral-content: var(--primary-foreground);
    --color-info: #2563eb;
    --color-info-content: #ffffff;
    --color-success: #15803d;
    --color-success-content: #ffffff;
    --color-warning: #b45309;
    --color-warning-content: #ffffff;
    --color-error: var(--destructive);
    --color-error-content: #ffffff;

    --radius-selector: 0.25rem;
    --radius-field: 0.375rem;
    --radius-box: 0.625rem;
    --size-field: 0.25rem;
    --size-selector: 0.25rem;
    --border: 1px;
    --depth: 0;
    --noise: 0;
}


/* Reserva sempre o espaço da barra de rolagem: sem isso, páginas curtas (sem barra) ficam mais largas e o
   cabeçalho centralizado "pula" ao navegar entre elas (Windows e demais sistemas com barra que ocupa espaço). */
html { scrollbar-gutter: stable; }
html { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: #ffffff; color: #09090b; font-size: 0.9375rem; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* Botões */
.btn {
    font-weight: 500; font-size: 0.875rem; box-shadow: none; border-radius: 0.375rem;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:focus-visible { outline: 2px solid #a1a1aa; outline-offset: 2px; }
.btn-primary { background: #18181b; border-color: #18181b; color: #fafafa; }
.btn-primary:hover { background: #27272a; border-color: #27272a; }
.btn-outline { background: #fff; border-color: #e4e4e7; color: #09090b; }
.btn-outline:hover { background: #f4f4f5; border-color: #e4e4e7; color: #09090b; }
.btn-ghost { color: #09090b; }
.btn-ghost:hover { background: #f4f4f5; border-color: transparent; }
.btn-error { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-error:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-lg { font-size: 0.9375rem; padding-inline: 1.75rem; }
.btn:disabled, .btn[disabled] { opacity: .5; background: #f4f4f5; color: #71717a; border-color: #e4e4e7; }

/* Campos */
.input, .select, .textarea {
    border-color: #e4e4e7; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); font-size: 0.875rem;
}
.input:focus, .input:focus-within, .select:focus, .textarea:focus {
    outline: 2px solid #d4d4d8; outline-offset: 1px; border-color: #a1a1aa;
}
.checkbox { border-color: #a1a1aa; }
.checkbox-primary:checked { background: #18181b; border-color: #18181b; color: #fafafa; }
.range-primary { color: #18181b; }

/* Cartões, alertas, badges */
.card { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); border-radius: 0.75rem; }
.alert { border-radius: 0.5rem; font-size: 0.875rem; border: 1px solid; }
.alert-soft.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert-soft.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-soft.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-soft.alert-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.badge { font-weight: 500; border-radius: 9999px; }
.badge-soft, .badge-outline { border-color: #e4e4e7; }

/* Menu / lista de opções, tabela, modal */
.menu li > *:not(ul, .menu-title, details, .btn):active, .menu li > *:not(ul, .menu-title, details, .btn):hover { background: #f4f4f5; }
.table :where(thead, tfoot) { color: #71717a; font-weight: 500; }
.table :where(thead th) { font-size: 0.75rem; text-transform: none; letter-spacing: 0; }
.table tr:hover { background: #fafafa; }
.modal-box { border-radius: 0.75rem; box-shadow: 0 10px 30px rgb(0 0 0 / 0.12); }
.link { text-underline-offset: 3px; }

/* Utilitários do design system */
.ds-eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; color: #52525b; }
/* zinc-600: contraste de 7:1 no branco e de 6:1 no cinza claro (WCAG AA exige 4,5:1) */
.ds-muted { color: #52525b; }
.ds-grid-bg {
    background-image: radial-gradient(#e4e4e7 1px, transparent 1px);
    background-size: 22px 22px;
}

/* Indicador de carregamento do HTMX (o HTMX não injeta mais <style>: a CSP não permite estilo embutido) */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
