/* ─────────────────────────────────────────────────────────────
   Rastroo$ — base global (reset + tipografia + botões + utils)
   Espelha a seção Base/Buttons do protótipo (styles.css).
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    text-decoration: underline;
}

::selection {
    background: var(--primary);
    color: white;
}

button {
    font-family: inherit;
    color: inherit;      /* fundamental: sem isso o texto some no dark */
    cursor: pointer;
}

/* ── Utilitários ─────────────────────────────────────────── */
.muted { color: var(--text-dim); }
.accent { color: var(--accent); }

.link {
    background: none;
    border: 0;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}
.link:hover { background: color-mix(in oklch, var(--primary) 12%, transparent); }

/* ── Botões ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    font: 600 13px/1 var(--font);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: transform .12s, background .15s, border-color .15s, filter .15s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--primary), color-mix(in oklch, var(--primary) 80%, black));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px -10px var(--primary);
}
.btn-primary:hover {
    filter: brightness(1.08);
    background: linear-gradient(180deg, var(--primary), color-mix(in oklch, var(--primary) 80%, black));
}

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

.btn-block { width: 100%; }
.btn-icon-only { padding: 9px 10px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Atributo hidden vence o display do autor ────────────────────
   A regra [hidden]{display:none} do navegador vem do UA stylesheet e
   perde para QUALQUER regra de autor. Como .form > label, .check-row e
   afins usam display:flex, esconder por JS (el.hidden = true) não
   surtia efeito — o campo continuava na tela. Cada caso vinha sendo
   remendado isolado (.alf [hidden], .tx-extract-note[hidden],
   .modal-backdrop[hidden]); aqui a regra passa a valer para o app todo. */
[hidden] { display: none !important; }
