/*
 * Telas de entrada (portal e painel central) — versão "Ondas": formulário em campos de linha à
 * esquerda, marca à direita e feixes de linhas animados no fundo (`resources/js/sn2/auth-waves.js`).
 */
.sn2-auth {
    --sn2-auth-bg: #f6f7f9;
    --sn2-auth-fg-1: #141d2b;
    --sn2-auth-fg-2: #2e3e58;
    --sn2-auth-fg-3: #46546c;
    --sn2-auth-fg-4: #5a6880;
    --sn2-auth-fg-5: #8a96a8;
    --sn2-auth-placeholder: #a3adbb;
    --sn2-auth-line: #c9d2de;
    --sn2-auth-line-filled: #141d2b;
    --sn2-auth-border: #cfd8e3;
    --sn2-auth-divider: #d3dae4;
    --sn2-auth-accent: #1f7be6;
    --sn2-auth-accent-hover: #1769cc;
    --sn2-auth-link: #1a74e2;
    --sn2-auth-link-hover: #0f5fc4;
    --sn2-auth-dark: #141d2b;
    --sn2-auth-dark-hover: #000;
    --sn2-auth-danger: #e5484d;
    --sn2-auth-danger-fg: #c42b2b;
    --sn2-auth-danger-text: #a32020;
    --sn2-auth-success: #22a565;
    --sn2-auth-success-text: #17784a;
    --sn2-auth-warning: #c2560c;
    --sn2-auth-warning-bg: #fff3e6;
    --sn2-auth-warning-border: #fcd9b4;
    --sn2-auth-label-w: 60px;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 32px;
    overflow: hidden;
    background: var(--sn2-auth-bg);
    font-family: 'Plus Jakarta Sans', var(--sn2-font-sans);
    color: var(--sn2-auth-fg-1);
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] .sn2-auth {
    --sn2-auth-bg: #0f1520;
    --sn2-auth-fg-1: #eef2f8;
    --sn2-auth-fg-2: #c9d3e2;
    --sn2-auth-fg-3: #aab6c8;
    --sn2-auth-fg-4: #93a0b5;
    --sn2-auth-fg-5: #75839a;
    --sn2-auth-placeholder: #5d6a80;
    --sn2-auth-line: #36435a;
    --sn2-auth-line-filled: #c9d3e2;
    --sn2-auth-border: #36435a;
    --sn2-auth-divider: #2b3649;
    --sn2-auth-link: #5aa2f5;
    --sn2-auth-link-hover: #8cc0ff;
    --sn2-auth-dark: #eef2f8;
    --sn2-auth-dark-hover: #fff;
    --sn2-auth-danger-fg: #ff7b7f;
    --sn2-auth-danger-text: #ff9a9d;
    --sn2-auth-success-text: #4fd08f;
    --sn2-auth-warning-bg: #3a2414;
    --sn2-auth-warning-border: #6b3c17;
    --sn2-auth-warning: #ffa35c;
}

.sn2-auth__waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

/* Até o primeiro quadro (o JS chega depois do CSS), o canvas fica transparente e entra suave. */
.sn2-auth__waves:not(.is-drawn) { opacity: 0; }

/* Botão que pausa/retoma as ondas: canto inferior direito, pílula clara com borda e sombra leve. */
.sn2-auth__motion {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--sn2-auth-fg-3);
    background: color-mix(in srgb, var(--sn2-auth-bg) 82%, #fff);
    border: 1px solid var(--sn2-auth-border);
    border-radius: 999px;
    box-shadow: 0 4px 14px -6px rgba(20, 29, 43, 0.28);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sn2-auth__motion:hover,
.sn2-auth__motion:focus-visible {
    color: var(--sn2-auth-accent);
    border-color: var(--sn2-auth-accent);
    box-shadow: 0 6px 18px -6px rgba(31, 123, 230, 0.45);
    transform: translateY(-1px);
}

.sn2-auth__motion:focus-visible { outline: 2px solid var(--sn2-auth-accent); outline-offset: 2px; }

.sn2-auth__theme {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
}

.sn2-auth__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    width: 100%;
    max-width: 1080px;
}

.sn2-auth__col {
    display: flex;
    flex: 1 1 400px;
    flex-direction: column;
    gap: 36px;
    max-width: 460px;
    min-width: 0;
}

.sn2-auth__col--wide { max-width: 560px; }

.sn2-auth__brand {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 24px;
}

.sn2-auth__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--sn2-auth-fg-1);
}

.sn2-auth__logo-name {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #253247;
}

[data-theme="dark"] .sn2-auth__logo-name { color: var(--sn2-auth-fg-1); }

.sn2-auth__divider {
    width: 1px;
    height: 40px;
    background: var(--sn2-auth-divider);
}

.sn2-auth__tagline {
    font-size: 22px;
    color: var(--sn2-auth-fg-5);
    white-space: nowrap;
}

.sn2-auth__footer {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    margin: 0;
    font-size: 12px;
    color: var(--sn2-auth-fg-5);
    text-align: center;
}

/* ---------------------------------------------------------------- Conteúdo de cada tela */
.sn2-auth-view {
    display: flex;
    flex-direction: column;
    gap: 36px;
    animation: sn2-auth-in 0.4s ease-out;
}

.sn2-auth-view--compact { gap: 28px; }

/* Rótulos mais longos ("Nova senha"): todas as linhas da tela com a mesma largura de rótulo. */
.sn2-auth-view--labels-lg { --sn2-auth-label-w: 84px; }

.sn2-auth-view form {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.sn2-auth-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sn2-auth-title {
    margin: 0;
    font-family: inherit;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--sn2-auth-fg-1);
    text-wrap: balance;
}

.sn2-auth-lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--sn2-auth-fg-4);
    text-wrap: pretty;
}

.sn2-auth-lead strong { color: var(--sn2-auth-fg-1); }

.sn2-auth-badge {
    align-self: flex-start;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--sn2-auth-bg);
    background: var(--sn2-auth-dark);
    border-radius: 999px;
}

.sn2-auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    animation: sn2-auth-pop 0.4s ease-out;
}

.sn2-auth-icon--success {
    color: #fff;
    background: var(--sn2-auth-success);
}

.sn2-auth-icon--warning {
    color: var(--sn2-auth-warning);
    background: var(--sn2-auth-warning-bg);
    border: 1px solid var(--sn2-auth-warning-border);
}

/* Alerta sem caixa: só o filete à esquerda. */
.sn2-auth-alert {
    margin: 0;
    padding-left: 14px;
    border-left: 3px solid var(--sn2-auth-danger);
    font-size: 14px;
    line-height: 1.5;
    color: var(--sn2-auth-danger-text);
}

.sn2-auth-alert--success {
    border-left-color: var(--sn2-auth-success);
    color: var(--sn2-auth-success-text);
}

.sn2-auth-alert--warning {
    border-left-color: var(--sn2-auth-warning);
    color: var(--sn2-auth-warning);
}

/* Cada campo já reserva a linha da mensagem de erro: o espaço entre as linhas fica 14px + 24px. */
.sn2-auth-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sn2-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Campo em linha: rótulo à esquerda e só a borda de baixo. */
.sn2-auth-line {
    display: flex;
    /* Rótulo, texto digitado e "Mostrar" na mesma linha de base (centralizar deixava o rótulo, menor,
       mais alto que o texto do campo). */
    align-items: baseline;
    gap: 12px;
    border-bottom: 1.5px solid var(--sn2-auth-line);
    transition: border-color 0.2s;
}

.sn2-auth-line:has(input:not(:placeholder-shown)) { border-bottom-color: var(--sn2-auth-line-filled); }

.sn2-auth .sn2-auth-line:focus-within { border-bottom-color: var(--sn2-auth-accent); }

/* Acima de "preenchido" e "em foco" (o `:has()` pesa mais que uma classe). */
.sn2-auth .sn2-auth-line.is-invalid { border-bottom-color: var(--sn2-auth-danger); }

.sn2-auth-line__label {
    flex: none;
    width: var(--sn2-auth-label-w);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--sn2-auth-fg-5);
}

.sn2-auth-line__input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    color: var(--sn2-auth-fg-1);
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
}

.sn2-auth-line__input::placeholder { color: var(--sn2-auth-placeholder); }

.sn2-auth-line__input--code {
    font-family: var(--sn2-font-mono);
    font-size: 20px;
    letter-spacing: 0.35em;
}

/* Código de 6 dígitos em caixas (`x-sn2.auth-code`). */
.sn2-auth-code {
    display: flex;
    gap: 10px;
}

.sn2-auth-code__box {
    flex: 1 1 0;
    min-width: 0;
    height: 64px;
    padding: 0;
    font-family: inherit;
    font-size: 26px;
    font-weight: 700;
    color: var(--sn2-auth-fg-1);
    text-align: center;
    caret-color: var(--sn2-auth-accent);
    background: transparent;
    border: 1.5px solid var(--sn2-auth-line);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sn2-auth-code__box:not(:placeholder-shown) { border-color: var(--sn2-auth-line-filled); }

.sn2-auth-code__box:focus {
    border-color: var(--sn2-auth-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sn2-auth-accent) 18%, transparent);
}

.sn2-auth-code.is-invalid .sn2-auth-code__box { border-color: var(--sn2-auth-danger); }

@media (max-width: 420px) {
    .sn2-auth-code { gap: 6px; }

    .sn2-auth-code__box { height: 54px; font-size: 22px; }
}

/*
 * Preenchimento automático do navegador: sem o fundo azul e com a mesma fonte do campo. O Chrome
 * pinta o fundo com !important, então a sombra interna na cor da página cobre esse fundo. Regras
 * separadas: um seletor desconhecido numa lista invalida a lista inteira.
 */
.sn2-auth-line__input:-webkit-autofill,
.sn2-auth-line__input:-webkit-autofill:hover,
.sn2-auth-line__input:-webkit-autofill:focus {
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    -webkit-text-fill-color: var(--sn2-auth-fg-1);
    caret-color: var(--sn2-auth-fg-1);
    -webkit-box-shadow: 0 0 0 1000px var(--sn2-auth-bg) inset;
    box-shadow: 0 0 0 1000px var(--sn2-auth-bg) inset;
    transition: background-color 9999s ease-out;
}

/*
 * Valor preenchido no carregamento: até a primeira interação com a página o Chrome desenha o texto
 * com a fonte dele (menor) e só aceita estilo pela primeira linha. Sem isto a letra "pula" de tamanho.
 */
.sn2-auth-line__input:-webkit-autofill::first-line {
    font-family: 'Plus Jakarta Sans', var(--sn2-font-sans);
    font-size: 17px;
    font-weight: 500;
}

.sn2-auth-line__input:autofill {
    -webkit-text-fill-color: var(--sn2-auth-fg-1);
    box-shadow: 0 0 0 1000px var(--sn2-auth-bg) inset;
}

.sn2-auth-line__toggle {
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--sn2-auth-fg-4);
    background: none;
    border: none;
    cursor: pointer;
}

.sn2-auth-line__toggle:hover { color: var(--sn2-auth-accent); }

.sn2-auth-error {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: var(--sn2-auth-danger-fg);
}

.sn2-auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -4px;
    font-size: 13px;
    color: var(--sn2-auth-fg-3);
}

.sn2-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sn2-auth-check input {
    /* Caixa própria: a nativa do Chrome no Windows é desenhada menor e mais alta dentro dos 16px e
       não alinha com o texto. Centrada no meio do texto pelo flex do rótulo, sem deslocamento. */
    appearance: none;
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0;
    background: transparent no-repeat center / 12px 12px;
    border: 1.5px solid var(--sn2-auth-fg-5);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.sn2-auth-check input:hover { border-color: var(--sn2-auth-accent); }

.sn2-auth-check input:checked {
    background-color: var(--sn2-auth-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    border-color: var(--sn2-auth-accent);
}

.sn2-auth-check input:focus-visible {
    outline: 2px solid var(--sn2-auth-accent);
    outline-offset: 2px;
}

.sn2-auth a,
.sn2-auth-link {
    font-weight: 600;
    color: var(--sn2-auth-link);
    text-decoration: none;
}

.sn2-auth a:hover,
.sn2-auth-link:hover {
    color: var(--sn2-auth-link-hover);
    text-decoration: underline;
}

.sn2-auth .sn2-auth-link--muted {
    align-self: flex-start;
    font-weight: 500;
    color: var(--sn2-auth-fg-4);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    /* Sublinhado mais perto do texto: a 3px ele "puxava" o link para baixo da linha do checkbox. */
    text-underline-offset: 2px;
}

.sn2-auth .sn2-auth-link--muted:hover { color: var(--sn2-auth-accent); }

button.sn2-auth-link {
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

.sn2-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sn2-auth .sn2-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--sn2-auth-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.sn2-auth .sn2-auth-btn:hover {
    color: #fff;
    text-decoration: none;
    background: var(--sn2-auth-accent-hover);
}

.sn2-auth .sn2-auth-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.sn2-auth .sn2-auth-btn--dark {
    color: var(--sn2-auth-bg);
    background: var(--sn2-auth-dark);
}

.sn2-auth .sn2-auth-btn--dark:hover {
    color: var(--sn2-auth-bg);
    background: var(--sn2-auth-dark-hover);
}

.sn2-auth .sn2-auth-btn--secondary {
    font-size: 14px;
    font-weight: 500;
    color: var(--sn2-auth-fg-2);
    background: transparent;
    border: 1px solid var(--sn2-auth-border);
}

.sn2-auth .sn2-auth-btn--secondary:hover {
    color: var(--sn2-auth-accent);
    background: transparent;
    border-color: var(--sn2-auth-accent);
}

.sn2-auth-foot {
    margin: 0;
    font-size: 13px;
    color: var(--sn2-auth-fg-4);
    text-align: center;
}

.sn2-auth-foot--start { text-align: left; }

/* Escolha da tela única (empresas ou painel central). */
.sn2-auth-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sn2-auth .sn2-auth-choice {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 18px;
    font-family: inherit;
    text-align: left;
    color: var(--sn2-auth-fg-1);
    background: color-mix(in srgb, var(--sn2-auth-bg) 70%, #fff);
    border: 1px solid var(--sn2-auth-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sn2-auth .sn2-auth-choice:hover,
.sn2-auth .sn2-auth-choice:focus-visible {
    border-color: var(--sn2-auth-accent);
    box-shadow: 0 8px 22px -12px rgba(31, 123, 230, 0.45);
    transform: translateY(-1px);
    outline: none;
}

.sn2-auth .sn2-auth-choice:disabled { opacity: 0.6; cursor: progress; }

.sn2-auth-choice__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: linear-gradient(135deg, #1f7be6, #3fb6f4);
    border-radius: 10px;
}

.sn2-auth-choice__icon--dark { background: var(--sn2-auth-dark); color: var(--sn2-auth-bg); }

.sn2-auth-choice__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sn2-auth-choice__title {
    font-size: 16px;
    font-weight: 700;
}

.sn2-auth-choice__sub {
    font-size: 13px;
    color: var(--sn2-auth-fg-4);
}

.sn2-auth-choice__go {
    flex: none;
    font-size: 18px;
    color: var(--sn2-auth-fg-5);
    transition: color 0.15s, transform 0.15s;
}

.sn2-auth .sn2-auth-choice:hover .sn2-auth-choice__go { color: var(--sn2-auth-accent); transform: translateX(2px); }

/* Recolhível (código de recuperação na verificação em duas etapas). */
/* Centralizado como o rodapé ("Voltar para o login") logo abaixo. */
.sn2-auth-disclosure > summary {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--sn2-auth-link);
    cursor: pointer;
}

.sn2-auth-disclosure[open] > summary { margin-bottom: 26px; }

/* ---------------------------------------------------------------- Carregando (depois de "Entrar") */
.sn2-auth-loading {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--sn2-auth-bg);
    animation: sn2-auth-in 0.35s ease-out;
}

/* Na página de passagem a tela já estava visível na página anterior: sem animação de entrada (piscaria). */
.sn2-auth-loading--static { animation: none; }

/* As ondas continuam por cima da tela de carregamento (o canvas não recebe clique). */
.sn2-auth.is-loading .sn2-auth__waves,
.sn2-auth--loading .sn2-auth__waves { z-index: 6; }

.sn2-auth-loading__logo { height: 64px; }

.sn2-auth-loading__logo .sn2-auth__logo-name { font-size: 40px; }

.sn2-auth-loading__track {
    display: block;
    width: 220px;
    height: 3px;
    overflow: hidden;
    background: #e3e8ef;
    border-radius: 3px;
}

[data-theme="dark"] .sn2-auth-loading__track { background: #26314a; }

.sn2-auth-loading__bar {
    display: block;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #1f7be6, #3fb6f4);
    border-radius: 3px;
    animation: sn2-auth-bar 1.1s ease-in-out infinite;
}

.sn2-auth-loading__texts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.sn2-auth-loading__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--sn2-auth-fg-1);
}

/* Reticências que acendem uma a uma depois do status. */
.sn2-auth-loading__dots {
    display: inline-flex;
    width: 1.1em;
}

.sn2-auth-loading__dots span {
    opacity: 0.15;
    animation: sn2-auth-dot 1.2s ease-in-out infinite;
}

.sn2-auth-loading__dots span:nth-child(2) { animation-delay: 0.2s; }

.sn2-auth-loading__dots span:nth-child(3) { animation-delay: 0.4s; }

.sn2-auth-loading__sub {
    font-size: 13px;
    color: var(--sn2-auth-fg-5);
}

@keyframes sn2-auth-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

@keyframes sn2-auth-dot {
    0%, 20% { opacity: 0.15; }
    40%, 60% { opacity: 1; }
    100% { opacity: 0.15; }
}

/* ---------------------------------------------------------------- Telas de erro (errors.minimal)
 * Mesmo fundo e marca das telas de entrada; só o conteúdo do meio muda. Código grande em degradê:
 * azul nos 4xx, laranja nos 5xx. */
.sn2-error__top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}

.sn2-error__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--sn2-auth-accent);
    background: color-mix(in srgb, var(--sn2-auth-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--sn2-auth-accent) 22%, transparent);
    border-radius: 14px;
}

.sn2-error__code {
    font-size: 88px;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    color: var(--sn2-auth-accent);
    background: linear-gradient(120deg, #1f7be6 10%, #3fb6f4 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sn2-error[data-code^="5"] .sn2-error__icon {
    color: #e0631a;
    background: color-mix(in srgb, #f97316 12%, transparent);
    border-color: color-mix(in srgb, #f97316 24%, transparent);
}

.sn2-error[data-code^="5"] .sn2-error__code {
    background: linear-gradient(120deg, #f97316 10%, #e5484d 90%);
    -webkit-background-clip: text;
    background-clip: text;
}

.sn2-error__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sn2-auth .sn2-error__actions .sn2-auth-btn {
    width: auto;
    min-width: 170px;
    padding: 0 22px;
}

.sn2-auth .sn2-error__actions .sn2-icon { flex: none; }

/* Botão de pausar das telas de erro (sem Alpine): o ícone segue `data-playing`. */
.sn2-auth__motion[data-playing="true"] .sn2-auth__motion-play,
.sn2-auth__motion[data-playing="false"] .sn2-auth__motion-pause { display: none; }

@media (max-width: 640px) {
    .sn2-error__code { font-size: 64px; }

    .sn2-auth .sn2-error__actions .sn2-auth-btn { flex: 1 1 100%; }
}

@keyframes sn2-auth-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes sn2-auth-pop {
    0% { opacity: 0; transform: scale(0.4); }
    70% { transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}

.sn2-auth--settled .sn2-auth-view { animation: none; }

@media (prefers-reduced-motion: reduce) {
    .sn2-auth-view,
    .sn2-auth-icon { animation: none; }
}

/*
 * A tela de carregamento anima sempre, como as ondas (decisão de produto): sem isto, a regra global de
 * `base.css` para menos movimento (`* { animation-duration: 0.01ms !important }`) deixaria a barra
 * e as reticências paradas. O status fica fixo (sem "respirar"), só as reticências se mexem.
 */
@media (prefers-reduced-motion: reduce) {
    .sn2-auth-loading__bar {
        animation-duration: 1.1s !important;
        animation-iteration-count: infinite !important;
    }

    .sn2-auth-loading__dots span {
        animation-duration: 1.2s !important;
        animation-iteration-count: infinite !important;
    }
}

@media (max-width: 640px) {
    .sn2-auth {
        align-items: flex-start;
        padding: 40px 16px 72px;
    }

    /* Na tela alta e estreita os feixes passam por trás do formulário: ficam mais claros. */
    .sn2-auth__waves { opacity: 0.55; }

    .sn2-auth__inner { gap: 40px; }

    .sn2-auth__col { flex-basis: 100%; }

    .sn2-auth-title { font-size: 28px; }

    .sn2-auth__brand { gap: 16px; }

    .sn2-auth__logo-name { font-size: 28px; }

    .sn2-auth__tagline { font-size: 17px; }
}
