/*
 * Shared management interface.
 * Preserve the existing wordmark lettering and application palette.
 */

:root {
    --bordeaux: #741f35;
    --bordeaux-dark: #541426;
    --ink: #242326;
    --muted: #656067;
    --paper: #ffffff;
    --soft: #f6f4f2;
    --line: #ded8d5;
}

* {
    box-sizing: border-box;
}

[hidden],
input[type="hidden"] {
    display: none !important;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

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

a {
    color: inherit;
    text-underline-offset: 0.2em;
}

.gestao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 18px clamp(20px, 4vw, 56px);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.marca {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1.8px;
    line-height: 1;
}

.marca img {
    display: block;
    width: 40px;
    height: auto;
}

/*
 * Non-visible overflow makes the inline-block baseline its bottom edge.
 * This prevents the hidden punctuation glyph from lowering the circle.
 * All management pages share this correction.
 */
.marca .marca-ponto {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 1px;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: var(--bordeaux);
    color: transparent;
    font-size: 0;
    line-height: 0;
    letter-spacing: 0;
    vertical-align: baseline;
}

/*
 * Decorative heading punctuation.
 * Keep the inherited font size so em dimensions follow the heading.
 */
.titulo-ponto {
    display: inline-block;
    width: 0.16em;
    height: 0.16em;
    margin-left: 0.025em;
    overflow: hidden;
    border-radius: 50%;
    background: var(--bordeaux);
    color: transparent;
    line-height: 0;
    letter-spacing: 0;
    vertical-align: baseline;
}

.area-label {
    color: var(--muted);
    font-size: 0.8125rem;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--bordeaux);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

h2 {
    margin: 0 0 10px;
    font-size: 1.1875rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.introducao {
    margin: 0 0 20px;
    max-width: 70ch;
    color: var(--muted);
    font-size: 0.9375rem;
}

label {
    display: block;
    margin: 14px 0 6px;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 12px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 1rem;
    line-height: 1.4;
}

textarea {
    display: block;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--bordeaux);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--bordeaux);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--bordeaux);
    outline-offset: 3px;
}

input:disabled,
select:disabled,
textarea:disabled {
    color: var(--muted);
    background: var(--soft);
    cursor: not-allowed;
}

.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin-top: 20px;
    padding: 10px 18px;
    color: var(--paper);
    background: var(--bordeaux);
    border: 1px solid var(--bordeaux);
    border-radius: 7px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.botao:hover:not(:disabled) {
    background: var(--bordeaux-dark);
    border-color: var(--bordeaux-dark);
}

.botao:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.botao-texto {
    min-height: 36px;
    padding: 6px 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.form-secundario {
    margin-top: 20px;
}

.aviso {
    margin: 16px 0;
    padding: 10px 14px;
    background: var(--soft);
    border-left: 3px solid var(--bordeaux);
    font-size: 0.875rem;
    line-height: 1.5;
}

.aviso p {
    margin: 0;
}

.aviso p + p {
    margin-top: 6px;
}

.painel-container {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    max-width: 1360px;
    margin: auto;
    padding: 32px clamp(20px, 4vw, 56px);
}

.painel-conteudo {
    min-width: 0;
}

.menu-gestao {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.875rem;
}

.menu-gestao > span {
    padding: 9px 12px;
    border-radius: 7px;
}

.menu-gestao a {
    text-decoration: none;
}

.menu-gestao a:hover {
    color: var(--bordeaux);
    text-decoration: underline;
}

.menu-ativo {
    color: var(--bordeaux);
    background: var(--paper);
    font-weight: 700;
}

.menu-gestao [aria-disabled="true"] {
    color: var(--muted);
}

.painel-cartoes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.painel-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.painel-card p,
.nota {
    color: var(--muted);
}

.link-acao,
.estado {
    margin-top: auto;
    padding-top: 12px;
    color: var(--bordeaux);
    font-size: 0.9375rem;
    font-weight: 600;
}

.link-acao {
    text-underline-offset: 4px;
}

.estado {
    font-size: 0.8125rem;
}

.nota {
    margin-top: 16px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.acesso-container {
    display: grid;
    place-items: start center;
    min-height: calc(100vh - 76px);
    padding: clamp(28px, 6vh, 64px) 20px;
}

.acesso-card {
    width: min(100%, 460px);
    padding: clamp(24px, 4vw, 36px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgb(36 35 38 / 6%);
}

@media (max-width: 800px) {
    .painel-container {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: 24px;
    }

    .menu-gestao {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .menu-gestao .eyebrow {
        width: 100%;
        margin-bottom: 2px;
    }

    .painel-cartoes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .painel-card {
        padding: 18px;
    }

    .gestao-header {
        padding-inline: 18px;
    }
}

@media (forced-colors: active) {
    .marca .marca-ponto,
    .titulo-ponto {
        background: CanvasText;
        border: 1px solid CanvasText;
    }
}
