/* ==========================================================================
   FIVAR — design system
   Identidade institucional: azul profundo + dourado, refinados em escalas.
   Sem dependência de CDN: fontes locais (fonts.css) e ícones em SVG inline.
   ========================================================================== */

@import url("fonts.css");

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Azul institucional — o #003366 original vira o degrau 800 de uma escala */
    --blue-50: #eef4fa;
    --blue-100: #d8e6f4;
    --blue-200: #b3cce8;
    --blue-300: #83abd6;
    --blue-400: #5286bf;
    --blue-500: #2f66a4;
    --blue-600: #1d4e88;
    --blue-700: #123d6e;
    --blue-800: #003366;
    --blue-900: #002348;
    --blue-950: #00162e;

    /* Dourado institucional */
    --gold-100: #faf3dc;
    --gold-200: #f2e3b0;
    --gold-300: #e8cf7c;
    --gold-400: #ddbc51;
    --gold-500: #d4af37;
    --gold-600: #b28f24;
    --gold-700: #8a6d1a;

    --gray-0: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f7f8fa;
    --gray-100: #eef0f4;
    --gray-200: #e0e4ea;
    --gray-300: #c8cfd9;
    --gray-400: #98a2b3;
    --gray-500: #6b7688;
    --gray-600: #4d5666;
    --gray-700: #384150;
    --gray-800: #232a36;
    --gray-900: #141922;
    --gray-950: #0b0e14;

    --green-50: #e9f7ef;
    --green-100: #cdeeda;
    --green-500: #1a8f4c;
    --green-600: #14733d;
    --green-700: #0f5a30;

    --red-50: #fdecec;
    --red-100: #fad5d5;
    --red-500: #c9342f;
    --red-600: #a82824;
    --red-700: #85201d;

    --amber-50: #fdf4e3;
    --amber-100: #f9e5bd;
    --amber-500: #b7791f;
    --amber-600: #955f13;

    /* Papéis semânticos — é isto que os componentes consomem */
    --bg: var(--gray-50);
    --surface: var(--gray-0);
    --surface-raised: var(--gray-0);
    --surface-sunken: var(--gray-100);
    --border: var(--gray-200);
    --border-strong: var(--gray-300);
    --text: var(--gray-800);
    --text-muted: var(--gray-500);
    --text-inverted: var(--gray-0);
    --brand: var(--blue-800);
    --brand-hover: var(--blue-700);
    --brand-soft: var(--blue-50);
    --brand-contrast: var(--gray-0);
    --accent: var(--gold-500);
    --accent-hover: var(--gold-400);
    --accent-contrast: var(--blue-900);

    --success: var(--green-600);
    --success-soft: var(--green-50);
    --success-border: var(--green-100);
    --danger: var(--red-600);
    --danger-soft: var(--red-50);
    --danger-border: var(--red-100);
    --warning: var(--amber-600);
    --warning-soft: var(--amber-50);
    --warning-border: var(--amber-100);

    /* Tipografia */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Escala fluida: cresce com a viewport sem media query */
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.9vw, 2.75rem);
    --text-4xl: clamp(2.25rem, 1.6rem + 3.2vw, 3.75rem);

    /* Espaçamento em passos de 4px */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 12px 20px -4px rgba(16, 24, 40, 0.1), 0 4px 8px -4px rgba(16, 24, 40, 0.04);
    --shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);

    --ring: 0 0 0 3px rgba(45, 102, 164, 0.35);
    --ring-danger: 0 0 0 3px rgba(201, 52, 47, 0.3);

    --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
    --content-width: 1180px;
    --content-narrow: 780px;
    --header-height: 72px;
}

/* Modo escuro: só os papéis semânticos mudam, os componentes seguem iguais */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: var(--gray-950);
        --surface: var(--gray-900);
        --surface-raised: var(--gray-800);
        --surface-sunken: var(--gray-950);
        --border: #262d3a;
        --border-strong: #333c4c;
        --text: #e6e9ef;
        --text-muted: #98a2b3;
        --brand: #4d83bd;
        --brand-hover: #6a9bcd;
        --brand-soft: rgba(77, 131, 189, 0.14);
        --brand-contrast: var(--gray-950);
        --accent: var(--gold-400);
        --accent-contrast: var(--gray-950);

        --success: #4ac47c;
        --success-soft: rgba(74, 196, 124, 0.12);
        --success-border: rgba(74, 196, 124, 0.28);
        --danger: #f2807a;
        --danger-soft: rgba(242, 128, 122, 0.12);
        --danger-border: rgba(242, 128, 122, 0.28);
        --warning: #e0af5c;
        --warning-soft: rgba(224, 175, 92, 0.12);
        --warning-border: rgba(224, 175, 92, 0.28);

        --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
        --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.55);
        --shadow-xl: 0 28px 56px rgba(0, 0, 0, 0.6);
        --ring: 0 0 0 3px rgba(109, 161, 214, 0.4);
    }
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    /* O arquivo antigo trazia `border_box` (underscore), valor inválido — o
       box-sizing nunca chegou a ser aplicado, o que desalinhava os grids. */
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

ul[class],
ol[class] {
    list-style: none;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--text);
    text-wrap: balance;
}

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

p {
    text-wrap: pretty;
}

code,
.mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.lead {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.65;
}

.eyebrow {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 2000;
    padding: var(--space-3) var(--space-5);
    background: var(--brand);
    color: var(--text-inverted);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--transition);
}

.skip-link:focus {
    top: var(--space-4);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container-narrow {
    max-width: var(--content-narrow);
}

main {
    flex: 1;
}

.section {
    padding-block: var(--space-20);
}

.section-tight {
    padding-block: var(--space-12);
}

.section-alt {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section-head {
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-head p {
    margin-top: var(--space-3);
    color: var(--text-muted);
    font-size: var(--text-lg);
}

.section-head .rule {
    width: 56px;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
    margin: var(--space-4) auto 0;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Conteúdo principal + coluna lateral. As telas de detalhe usavam
   grid-template-columns inline, que não colapsa em tela estreita e fazia o
   conteúdo estourar a largura. Aqui a quebra é declarada uma vez só.
   minmax(0, …) na primeira coluna impede que uma tabela larga force o grid
   a crescer além da viewport. */
.split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
}

.split-even {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.split-wide {
    gap: var(--space-10);
}

@media (max-width: 1100px) {
    .split,
    .split-even {
        grid-template-columns: minmax(0, 1fr);
    }
}

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.row-between {
    justify-content: space-between;
}

.row-end {
    justify-content: flex-end;
}

.spacer {
    flex: 1;
}

/* --------------------------------------------------------------------------
   5. Ícones
   -------------------------------------------------------------------------- */
.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.2em;
}

.icon-sm {
    width: 1em;
    height: 1em;
}

.icon-lg {
    width: 1.75em;
    height: 1.75em;
}

.icon-xl {
    width: 2.5em;
    height: 2.5em;
}

/* --------------------------------------------------------------------------
   6. Botões
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition), border-color var(--transition),
        color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.btn-primary {
    background: var(--brand);
    color: var(--brand-contrast);
    border-color: var(--brand);
}

.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn-accent {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--surface-sunken);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--surface-sunken);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    filter: brightness(0.92);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-danger-outline:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--text-sm);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    aspect-ratio: 1;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.link-arrow .icon {
    transition: transform var(--transition);
}

.link-arrow:hover .icon {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   7. Cabeçalho público
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--blue-800);
    border-bottom: 1px solid var(--blue-900);
}

@media (prefers-color-scheme: dark) {
    .site-header {
        background: var(--gray-900);
        border-bottom-color: var(--border);
    }
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-xs);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text small {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--gold-300);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav a {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition);
}

.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.nav a[aria-current="page"] {
    color: var(--gold-300);
    background: rgba(255, 255, 255, 0.07);
}

.nav .btn {
    margin-left: var(--space-3);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: var(--space-2);
    cursor: pointer;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    /* Menu real em mobile: painel deslizante, não a lista empilhada de antes */
    .nav {
        position: fixed;
        inset: var(--header-height) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
        padding: var(--space-4);
        background: var(--blue-900);
        border-bottom: 1px solid var(--blue-950);
        box-shadow: var(--shadow-xl);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), transform var(--transition),
            visibility var(--transition);
    }

    .nav[data-open="true"] {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        padding: var(--space-3) var(--space-4);
    }

    .nav .btn {
        margin-left: 0;
        margin-top: var(--space-2);
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(212, 175, 55, 0.18), transparent 60%),
        linear-gradient(160deg, var(--blue-800) 0%, var(--blue-900) 55%, var(--blue-950) 100%);
    color: #fff;
    padding-block: clamp(var(--space-16), 10vw, var(--space-24));
    overflow: hidden;
}

/* Trama diagonal sutil, desenhada em CSS — nada de imagem externa */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.03) 0 1px,
        transparent 1px 14px
    );
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-inner {
    max-width: 760px;
}

.hero h1 {
    font-size: var(--text-4xl);
    color: #fff;
    margin-bottom: var(--space-5);
}

.hero p {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.82);
    max-width: 58ch;
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-16);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stat .value {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gold-300);
    line-height: 1.1;
}

.hero-stat .label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.72);
    margin-top: var(--space-1);
}

.page-header {
    background: linear-gradient(160deg, var(--blue-800), var(--blue-900));
    color: #fff;
    padding-block: var(--space-16) var(--space-16);
}

.page-header h1 {
    color: #fff;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-lg);
    margin-top: var(--space-3);
    max-width: 60ch;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-4);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.card-pad {
    padding: var(--space-6);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    font-size: var(--text-lg);
    margin: 0;
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border);
    background: var(--surface-sunken);
}

/* Card de recurso da home */
.feature {
    padding: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), box-shadow var(--transition),
        border-color var(--transition);
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: var(--space-4);
}

.feature h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.feature p {
    color: var(--text-muted);
    font-size: var(--text-base);
}

/* Card de curso */
.course-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.course-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(140deg, var(--blue-700), var(--blue-900));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.course-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-media img {
    transform: scale(1.05);
}

/* Sem imagem cadastrada, o monograma do curso ocupa o lugar */
.course-monogram {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.05em;
}

.course-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: 0.25rem 0.625rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.course-body {
    padding: var(--space-5) var(--space-6) var(--space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-3);
}

.course-body h3 {
    font-size: var(--text-lg);
    color: var(--brand);
}

@media (prefers-color-scheme: dark) {
    .course-body h3 {
        color: var(--text);
    }
}

.course-body p {
    color: var(--text-muted);
    font-size: var(--text-base);
    flex: 1;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.course-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   10. Formulários
   -------------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.field label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}

.field .hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.field .error {
    font-size: var(--text-sm);
    color: var(--danger);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.required {
    color: var(--danger);
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
    box-shadow: var(--ring-danger);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7688' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

input[type="file"] {
    padding: var(--space-3);
    background: var(--surface-sunken);
    border-style: dashed;
    cursor: pointer;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    accent-color: var(--brand);
    cursor: pointer;
    flex: none;
}

.checkbox span {
    font-size: var(--text-base);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
}

.fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.fieldset legend {
    padding-inline: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   11. Alertas e badges
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
}

.alert .icon {
    flex: none;
    margin-top: 0.1em;
}

.alert-success {
    background: var(--success-soft);
    border-color: var(--success-border);
    color: var(--success);
}

.alert-error {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-soft);
    border-color: var(--warning-border);
    color: var(--warning);
}

.alert-info {
    background: var(--brand-soft);
    border-color: var(--blue-100);
    color: var(--brand);
}

@media (prefers-color-scheme: dark) {
    .alert-info {
        border-color: rgba(77, 131, 189, 0.3);
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: var(--success-border);
}

.badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: var(--danger-border);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: var(--warning-border);
}

.badge-neutral {
    background: var(--surface-sunken);
    color: var(--text-muted);
    border-color: var(--border);
}

.badge-brand {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: var(--blue-100);
}

@media (prefers-color-scheme: dark) {
    .badge-brand {
        border-color: rgba(77, 131, 189, 0.3);
    }
}

.flashes {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    right: var(--space-4);
    z-index: 500;
    width: min(400px, calc(100vw - var(--space-8)));
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.flashes .alert {
    margin: 0;
    background-color: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: slide-in 240ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.flashes .alert-success {
    background-color: var(--success-soft);
}

.flashes .alert-error {
    background-color: var(--danger-soft);
}

.flashes .alert-warning {
    background-color: var(--warning-soft);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --------------------------------------------------------------------------
   12. Tabelas
   -------------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

thead th {
    position: sticky;
    top: 0;
    background: var(--surface-sunken);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--surface-sunken);
}

.td-actions {
    text-align: right;
    white-space: nowrap;
}

.td-actions .btn {
    margin-left: var(--space-1);
}

.cell-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.cell-title:hover {
    text-decoration: underline;
}

.cell-sub {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.empty-state {
    padding: var(--space-16) var(--space-6);
    text-align: center;
    color: var(--text-muted);
}

.empty-state .icon {
    width: 44px;
    height: 44px;
    color: var(--gray-400);
    margin: 0 auto var(--space-4);
    stroke-width: 1.5;
}

.empty-state h3 {
    font-size: var(--text-lg);
    color: var(--text);
    margin-bottom: var(--space-2);
}

.empty-state p {
    max-width: 42ch;
    margin: 0 auto var(--space-5);
}

/* --------------------------------------------------------------------------
   13. Paginação
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding-inline: var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition), border-color var(--transition);
}

.pagination a:hover {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
}

.pagination .current {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-contrast);
    font-weight: 700;
}

.pagination .gap {
    border: none;
    background: none;
    color: var(--text-muted);
    min-width: 24px;
}

.pagination-info {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-3);
}

/* --------------------------------------------------------------------------
   14. Verificação de documentos (páginas públicas)
   -------------------------------------------------------------------------- */
.verify-shell {
    padding-block: var(--space-16);
}

.verify-card {
    max-width: 620px;
    margin-inline: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: clamp(var(--space-6), 4vw, var(--space-10));
}

.verify-card .seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: var(--space-5);
}

.verify-card h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.verify-card > p {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.code-input {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding-block: 0.875rem;
}

/* Faixa de veredito no topo do resultado */
.verdict {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: var(--space-6);
}

.verdict-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    flex: none;
}

.verdict h1 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.verdict p {
    font-size: var(--text-base);
    margin: 0;
}

.verdict-valid {
    background: var(--success-soft);
    border-color: var(--success-border);
}

.verdict-valid .verdict-icon {
    background: var(--success);
    color: #fff;
}

.verdict-valid h1 {
    color: var(--success);
}

.verdict-valid p {
    color: var(--success);
}

.verdict-revoked {
    background: var(--danger-soft);
    border-color: var(--danger-border);
}

.verdict-revoked .verdict-icon {
    background: var(--danger);
    color: #fff;
}

.verdict-revoked h1 {
    color: var(--danger);
}

.verdict-revoked p {
    color: var(--danger);
}

/* Lista de campos de um documento */
.data-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5) var(--space-8);
}

.data-item.span-all {
    grid-column: 1 / -1;
}

.data-item dt {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.data-item dd {
    font-size: var(--text-md);
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

.data-item dd.big {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 600;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    letter-spacing: 0.05em;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.625rem;
}

.hash-value {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.5;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    border-radius: var(--radius-xs);
}

.copy-btn:hover {
    color: var(--brand);
    background: var(--surface-sunken);
}

/* --------------------------------------------------------------------------
   15. Rodapé
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--blue-950);
    color: rgba(255, 255, 255, 0.7);
    padding-block: var(--space-16) var(--space-8);
    margin-top: var(--space-20);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--space-10);
}

.site-footer h3 {
    color: #fff;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--gold-500);
    display: inline-block;
}

.site-footer p {
    font-size: var(--text-base);
    line-height: 1.7;
}

.site-footer ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: var(--text-base);
    transition: color var(--transition);
}

.site-footer a:hover {
    color: var(--gold-300);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-base);
}

.footer-contact .icon {
    color: var(--gold-500);
    margin-top: 0.15em;
}

.footer-bottom {
    margin-top: var(--space-12);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   16. Painel administrativo
   -------------------------------------------------------------------------- */
.admin-body {
    background: var(--bg);
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--blue-900);
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

@media (prefers-color-scheme: dark) {
    .sidebar {
        background: var(--gray-900);
        border-right: 1px solid var(--border);
    }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.sidebar-brand img {
    height: 34px;
    border-radius: var(--radius-xs);
}

.sidebar-brand strong {
    font-family: var(--font-serif);
    font-size: var(--text-md);
    display: block;
    line-height: 1.2;
}

.sidebar-brand small {
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-300);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: var(--space-4) var(--space-3) var(--space-2);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--gold-500);
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gold-500);
    color: var(--blue-900);
    font-size: var(--text-sm);
    font-weight: 700;
    flex: none;
}

.sidebar-user .who {
    min-width: 0;
}

.sidebar-user .who strong {
    display: block;
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user .who span {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.55);
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-8);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar h1 {
    font-size: var(--text-xl);
    margin: 0;
}

.admin-topbar .subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-content {
    padding: var(--space-8);
    flex: 1;
}

.sidebar-toggle {
    display: none;
}

/* O backdrop é filho de .admin-layout, que é um grid. Sem `display: none`
   ele vira um item do grid e ocupa a célula da barra lateral, jogando a
   sidebar para a coluna 2 e o conteúdo para a linha de baixo. Só existe
   como elemento visível no modo mobile, onde é posicionado fixo. */
.sidebar-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .sidebar[data-open="true"] {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .admin-content {
        padding: var(--space-5);
    }

    .admin-topbar {
        padding: var(--space-4) var(--space-5);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), visibility var(--transition);
    }

    .sidebar-backdrop[data-open="true"] {
        opacity: 1;
        visibility: visible;
    }
}

/* Estatísticas do painel */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    color: var(--brand);
    flex: none;
}

.stat-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.stat-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-icon.accent {
    background: var(--warning-soft);
    color: var(--warning);
}

.stat .value {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.stat .label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.stat .sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* Barra de filtros das listagens */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.toolbar .field {
    margin-bottom: 0;
    min-width: 170px;
}

.toolbar .field-search {
    flex: 1;
    min-width: 240px;
}

.search-input {
    position: relative;
}

.search-input .icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input input {
    padding-left: 2.5rem;
}

/* Barra simples para gráfico de distribuição */
.bar-row {
    display: grid;
    grid-template-columns: 1fr 3fr auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

.bar-track {
    height: 8px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--brand);
    border-radius: var(--radius-full);
}

.bar-row .count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text-muted);
}

/* Linha do tempo da auditoria */
.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--text-sm);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    flex: none;
}

.timeline-body {
    min-width: 0;
    flex: 1;
}

.timeline-body strong {
    color: var(--text);
    font-weight: 600;
}

.timeline-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* Aviso destacado antes de uma ação destrutiva */
.danger-zone {
    border: 1px solid var(--danger-border);
    background: var(--danger-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.danger-zone h3 {
    font-size: var(--text-md);
    color: var(--danger);
    margin-bottom: var(--space-2);
}

.danger-zone p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   17. Login
   -------------------------------------------------------------------------- */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--space-6);
    background:
        radial-gradient(900px 500px at 20% 0%, rgba(212, 175, 55, 0.14), transparent 60%),
        linear-gradient(160deg, var(--blue-800), var(--blue-950));
}

.login-card {
    width: min(420px, 100%);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-8);
}

.login-card .brand-mark {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.login-card .brand-mark img {
    height: 44px;
    border-radius: var(--radius-sm);
}

.login-card h1 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.login-card .sub {
    color: var(--text-muted);
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
}

.login-back {
    display: block;
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.login-back:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   18. Página de erro
   -------------------------------------------------------------------------- */
.error-page {
    display: grid;
    place-items: center;
    padding: var(--space-24) var(--space-6);
    text-align: center;
}

.error-code {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 700;
    line-height: 1;
    color: var(--border-strong);
}

.error-page h1 {
    margin: var(--space-4) 0 var(--space-3);
}

.error-page p {
    color: var(--text-muted);
    max-width: 46ch;
    margin: 0 auto var(--space-8);
}

/* --------------------------------------------------------------------------
   19. Impressão — o comprovante de verificação costuma ser impresso
   -------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .flashes,
    .no-print,
    .sidebar,
    .admin-topbar {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .verdict,
    .card {
        border: 1px solid #999 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
    }

    .code-chip,
    .hash-value {
        border: none;
        background: none;
    }
}
