/*
Copyright (C) 2026 Selbetti, https://www.selbetti.com.br/

Telas de login (atendente: index.html, cliente: customer.html). Direção "verde profundo":
docs/specs/2026-10-19-login-selbetti-design.md. Sem dependências; Roboto local (Apache-2.0, fonts/roboto/LICENSE).
*/

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/roboto/roboto-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/roboto/roboto-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/roboto/roboto-latin-700-normal.woff2") format("woff2");
}

:root {
    --fundo: #0f2721;
    --brilho-1: #17473a;
    --brilho-2: #1d4a3e;
    --campo: #163630;
    --borda: #5a8377;
    --texto: #e7efec;
    --rotulo: #b9cbc4;
    --secundario: #9fb8af;
    --rodape: #8fa79e;
    --marca-clara: #80baa5;
    --principal: #00774b;
    --principal-hover: #006640;
    --acento: #ef8943;
    --erro-fundo: #3a1d1f;
    --erro-texto: #fecaca;
    --erro-borda: #e0787a;
    --raio: 6px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--fundo);
    background-image:
        radial-gradient(60% 55% at 12% 108%, var(--brilho-1) 0%, transparent 70%),
        radial-gradient(45% 40% at 100% -6%, var(--brilho-2) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--texto);
    font: 400 15px/1.45 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
}

.Pagina {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 32px;
}

.Login {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.Logo {
    display: block;
    width: 180px;
    height: auto;
    margin-bottom: 18px;
}

.Rotulo {
    margin: 0 0 -8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--marca-clara);
}

.Titulo {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.Subtitulo {
    margin: -6px 0 4px;
    font-size: 13px;
    color: var(--secundario);
}

/* faixa de mensagem (erros vindos do Znuny) */
.Mensagem {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--erro-borda);
    border-radius: var(--raio);
    background: var(--erro-fundo);
    color: var(--erro-texto);
    font-size: 13px;
}
.Mensagem[hidden] {
    display: none;
}

form {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.Campo label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rotulo);
}

.Campo input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    background: var(--campo);
    color: var(--texto);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.Campo input::placeholder {
    color: var(--secundario);
    opacity: 1;
}
.Campo input:focus {
    outline: none;
    border-color: var(--acento);
    box-shadow: 0 0 0 1px var(--acento);
}
.Campo--erro input {
    border-color: var(--erro-borda);
}
.Campo .Erro {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--erro-texto);
}
.Campo .Erro[hidden] {
    display: none;
}

/* botões */
.Botao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--raio);
    font: 500 17px/1 "Roboto", system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.Botao:active {
    transform: translateY(1px);
}
.Botao--principal {
    background: var(--principal);
    color: #ffffff;
}
.Botao--principal:hover {
    background: var(--principal-hover);
}
.Botao--secundario {
    background: transparent;
    border-color: var(--borda);
    color: var(--texto);
}
.Botao--secundario:hover {
    background: var(--campo);
}
.Botao svg {
    flex: none;
}

.Divisor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    font-size: 12px;
    color: var(--secundario);
}
.Divisor::before,
.Divisor::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #2a4c43;
}

/* links abaixo da senha: "Esqueci minha senha" e o 2º fator */
.Opcoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px 16px;
    font-size: 13px;
}
.Link {
    color: var(--acento);
    text-decoration: none;
}
.Link:hover {
    text-decoration: underline;
}
.SegundoFator summary {
    list-style: none;
    cursor: pointer;
    color: var(--secundario);
}
.SegundoFator summary::-webkit-details-marker {
    display: none;
}
.SegundoFator summary:hover {
    color: var(--texto);
}
.SegundoFator[open] {
    flex-basis: 100%;
}
.SegundoFator .Campo {
    margin-top: 10px;
}

/* foco visível pelo teclado */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--acento);
    outline-offset: 2px;
    border-radius: 3px;
}

.Rodape {
    padding: 0 16px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--rodape);
}
.Rodape a {
    color: var(--texto);
    text-decoration: none;
}
.Rodape a:hover {
    text-decoration: underline;
}

/* janela "Esqueci minha senha" */
.Janela {
    width: min(360px, calc(100% - 32px));
    padding: 24px;
    border: 1px solid #2a4c43;
    border-radius: 10px;
    background: #12302a;
    color: var(--texto);
}
.Janela::backdrop {
    background: rgba(5, 16, 13, 0.72);
}
.Janela h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}
.Janela p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--secundario);
}
.Janela .Acoes {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
