/* layout.css — grid do shell (código PRÓPRIO do sig2).
 *
 * Consome tokens semânticos do DS (var(--...)) sem definir nenhum: cor, fonte,
 * raio e sombra vêm de ds/styles.css (bundle 8cd72241, ADR-004). Os fallbacks
 * neutros abaixo só evitam tela ilegível caso o DS falte em dev.
 * Os CHROMES de navegação (7 modos do eixo data-nav) vivem em
 * shell-nav.css / shell-nav-float.css. */

[x-cloak] { display: none !important; }

html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg, #f5f5f4);
    color: var(--text, #1c1917);
    font-family: var(--font-sans, system-ui, sans-serif);
}

.shell { display: flex; min-height: 100vh; }
.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.shell-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0 1rem;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border, #e7e5e4);
}
.shell-page-title { font-size: 1.125rem; margin: 0; font-family: var(--font-display, inherit); }
.shell-content { flex: 1; padding: 1.25rem; }
.shell-nav-toggle {
    display: none;
    border: 1px solid var(--border, #e7e5e4);
    background: transparent;
    color: inherit;
    border-radius: var(--radius-md, 4px);
    padding: 0.25rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
}
.shell-scrim { display: none; }
.shell-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) {
    .shell-content { padding: 1rem; }
}

/* ── Login (página sem shell) ────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.auth-card { width: 100%; max-width: 22rem; }
.auth-card h1 { font-size: 1.25rem; margin-bottom: 1rem; }

/* ── Provisórios até os widgets do P02 (cards = contrato) ─────
   O DS só define a pele do primário ([data-btn] .sg-btn--primary) e dos
   campos ([data-field] .sg-field); a caixa do .sg-btn base (neutro) abaixo
   é decisão provisória autoral usando tokens. Morre no P02. */
.surface-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e7e5e4);
    border-radius: var(--radius-lg, 8px);
    box-shadow: var(--elevation-card, none);
    padding: 1.5rem;
}
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; margin-bottom: 0.375rem; font-weight: 500; }
.form-field .sg-field {
    width: 100%;
    height: var(--control-h, 36px);
    padding: 0 0.75rem;
    font: inherit;
    color: inherit;
}
.sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: var(--control-h, 36px);
    padding: 0 1rem;
    border: 1px solid var(--border, #e7e5e4);
    border-radius: var(--radius-md, 4px);
    background: var(--surface, #fff);
    color: inherit;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.auth-card .sg-btn--primary { width: 100%; }
.field-error { color: var(--negative-text, #b3261e); font-size: 0.875rem; margin-top: 0.375rem; }
.field-error p { margin: 0; }
