﻿/* ==========================================================================
   DXP Contábil — Telas de acesso
   Login, cadastro, recuperação de senha e nova senha.
   Mesmo padrão visual das telas de acesso do Agente de Cobrança (landing.css + auth.css),
   reunido em um único arquivo e com a paleta do logo do DXP Contábil (azul-marinho e teal).
   --------------------------------------------------------------------------
   01. Tokens               05. Estrutura
   02. Base                 06. Coluna da marca
   03. Utilitários          07. Formulário
   04. Botões               08. Mensagens e estados
                            09. DXP Contábil: marca, login social, cadastro e resumo
                            10. Responsivo e acessibilidade
   ========================================================================== */

/* 01. Tokens ============================================================== */
:root {
    --navy-950: #081523;
    --navy-900: #0c1f33;
    --navy-850: #10273f;
    --navy-800: #14304c;
    --navy-700: #193b5a; /* azul do logo */
    --navy-600: #24507a;

    --teal-50: #eef7f9;
    --teal-100: #d5ecf1;
    --teal-200: #b1dbe5;
    --teal-300: #8ccbda;
    --teal-400: #64acbe; /* teal do logo */
    --teal-500: #4a97ab;
    --teal-600: #367e92;
    --teal-700: #276778; /* 6,4:1 sobre branco */
    --teal-800: #1f5361;

    --slate-25: #fbfcfe;
    --slate-50: #f5f7fb;
    --slate-100: #edf1f7;
    --slate-200: #e1e7ef;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --on-dark: #e6edf6;
    --on-dark-muted: #a3b2c7;
    --on-dark-subtle: #8494ab;
    --line-dark: rgba(255, 255, 255, .08);

    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --amber-50: #fff7e6;
    --amber-700: #a15c00;

    --field-border: #7f8ca1; /* 3,4:1 sobre branco (WCAG 1.4.11) */

    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 6px -1px rgba(15, 23, 42, .06);
    --shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 12px 24px -8px rgba(15, 23, 42, .12);

    --gutter: clamp(16px, 4vw, 32px);
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

/* 02. Base ================================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--slate-600);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* Resets com especificidade zero (:where) para que as classes de componente sempre prevaleçam. */
:where(.auth-page) img,
:where(.auth-page) svg {
    display: block;
    max-width: 100%;
}

:where(.auth-page) img {
    height: auto;
}

:where(.auth-page) a {
    color: inherit;
    text-decoration: none;
}

:where(.auth-page) button,
:where(.auth-page) input,
:where(.auth-page) textarea,
:where(.auth-page) select {
    font: inherit;
    color: inherit;
}

:where(.auth-page) h1,
:where(.auth-page) h2,
:where(.auth-page) h3,
:where(.auth-page) h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--slate-900);
}

:where(.auth-page) p {
    margin: 0;
}

:where(.auth-page) ul,
:where(.auth-page) ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-page :focus-visible {
    outline: 3px solid var(--teal-700);
    outline-offset: 3px;
}

.skip-link:focus-visible {
    outline-color: var(--teal-400);
}

.auth-page .icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-page .icon--fill {
    fill: currentColor;
    stroke: none;
}

/* 03. Utilitários ========================================================= */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -120px;
    z-index: 1000;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--teal-400);
    color: var(--navy-900) !important;
    font-weight: 600;
    transition: top .2s;
}

.skip-link:focus {
    top: 12px;
}

.text-accent {
    color: var(--teal-400);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .text-accent {
        background: linear-gradient(92deg, var(--teal-300) 0%, var(--teal-400) 45%, #b9e6f5 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.icon-tile {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    color: var(--teal-700);
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
}

.icon-tile .icon {
    width: 22px;
    height: 22px;
}

.icon-tile--lg {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.icon-tile--lg .icon {
    width: 24px;
    height: 24px;
}

.checklist {
    display: grid;
    gap: 10px;
}

.checklist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.5;
    color: var(--slate-700);
}

.checklist li .icon {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--teal-600);
    stroke-width: 2.4;
}

.checklist--dark li {
    color: var(--on-dark);
}

.checklist--dark li .icon {
    color: var(--teal-400);
}

/* 04. Botões ============================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.btn .icon {
    width: 18px;
    height: 18px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 24px;
    font-size: 16px;
    border-radius: 12px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: .7;
    cursor: progress;
    transform: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .01em;
    color: var(--teal-700);
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(54, 126, 146, .18);
}

.eyebrow--dark {
    color: var(--teal-300);
    background: rgba(100, 172, 190, .08);
    border-color: rgba(100, 172, 190, .22);
}

.eyebrow--dark::before {
    box-shadow: 0 0 0 3px rgba(100, 172, 190, .18);
}

/* Marca */
.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    border-radius: 8px;
}

.brand img {
    width: auto;
    height: 40px;
}

.btn-block {
    width: 100%;
}

/* Botão principal sobre fundo claro (o teal fica para os detalhes e os fundos escuros). */
.btn-dark {
    background: var(--navy-900);
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(12, 31, 51, .2), 0 10px 24px -10px rgba(12, 31, 51, .55);
}

.btn-dark:hover {
    background: var(--navy-700);
}

.btn.is-busy {
    cursor: progress;
}

.btn.is-busy:hover {
    transform: none;
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    flex: none;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.is-busy .spinner {
    display: inline-block;
}

.is-busy .btn-icon {
    display: none;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 05. Estrutura =========================================================== */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
}

/* Barra do topo: azul-marinho com a marca (nas telas grandes some e ficam só as ações). */
.auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 12px var(--gutter);
    background: var(--navy-900);
    border-bottom: 1px solid var(--line-dark);
}

.auth-top :focus-visible {
    outline-color: var(--teal-400);
}

.auth-top-brand img {
    height: 36px;
}

.auth-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-top-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .04);
    transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.auth-top-link:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .3);
}

.auth-top-link .icon {
    width: 18px;
    height: 18px;
}

.auth-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vh, 64px) var(--gutter);
}

.auth-content:focus {
    outline: none;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
}

.auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 18px;
    padding: 20px var(--gutter) 24px;
    border-top: 1px solid var(--slate-100);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: var(--slate-500);
}

/* 06. Coluna da marca (telas grandes) ===================================== */
.auth-aside {
    display: none;
}

.auth-aside :focus-visible {
    outline-color: var(--teal-400);
}

.auth-aside-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%;
    padding: clamp(32px, 3.4vw, 52px);
}

.auth-aside-body {
    max-width: 540px;
    margin-block: auto;
}

.auth-aside-title {
    margin-top: 22px;
    font-family: var(--font-display);
    font-size: clamp(30px, 2.4vw, 40px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.035em;
    color: #fff;
}

.auth-aside-title span {
    display: block;
}

.auth-aside-lead {
    margin-top: 18px;
    max-width: 470px;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--on-dark-muted);
}

.auth-aside-points {
    margin-top: 26px;
}

.auth-aside-foot {
    font-size: 14px;
    color: var(--on-dark-subtle);
}

.auth-aside-foot a {
    font-weight: 600;
    color: var(--on-dark);
    text-decoration: underline;
    text-decoration-color: rgba(230, 237, 246, .35);
    text-underline-offset: 3px;
}

.auth-aside-foot a:hover {
    color: #fff;
    text-decoration-color: currentColor;
}

/* 07. Formulário ========================================================== */
.auth-head .icon-tile {
    margin-bottom: 20px;
}

.auth-head h1,
.auth-state h1,
.auth-state h2 {
    font-size: clamp(26px, 3.2vw, 32px);
    font-weight: 800;
    letter-spacing: -.03em;
}

.auth-head p {
    margin-top: 10px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--slate-600);
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-800);
}

.field-control {
    position: relative;
}

.field input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--field-border);
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    line-height: 1.4;
    color: var(--slate-900);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.field-control input {
    padding-right: 52px;
}

/* O Edge desenha o próprio olho de "revelar senha"; fica só o botão da tela. */
/* Regra isolada: um seletor desconhecido no mesmo grupo derrubaria a regra inteira. */
.field-control input::-ms-reveal {
    display: none;
}

.field input::placeholder {
    color: var(--slate-500);
}

.field input:hover {
    border-color: var(--slate-500);
}

.field input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(54, 126, 146, .18);
}

.field.is-invalid input {
    border-color: var(--rose-600);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .1);
}

.field.is-invalid input:focus {
    border-color: var(--rose-700);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .3);
}

/* Botão de mostrar/ocultar senha, dentro do campo */
.field-toggle {
    position: absolute;
    top: 50%;
    right: 2px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-500);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .2s var(--ease);
}

.field-toggle:hover {
    color: var(--slate-900);
}

.auth-page .field-toggle:focus-visible {
    outline-offset: -4px;
}

.field-toggle .icon {
    width: 20px;
    height: 20px;
}

.field-hint:empty,
.field-error {
    display: none;
}

.field-hint,
.field.is-invalid .field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.field-hint {
    color: var(--amber-700);
    font-weight: 500;
}

.field-error {
    color: var(--rose-700);
}

.field-error .icon {
    width: 14px;
    height: 14px;
}

.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: -4px;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--teal-700);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}

.auth-link:hover {
    color: var(--teal-800);
    text-decoration-color: currentColor;
}

.auth-link .icon {
    width: 16px;
    height: 16px;
}

.auth-link--back {
    margin-bottom: 28px;
}

.auth-link--back .icon {
    transition: transform .2s var(--ease);
}

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

.auth-form .btn-block {
    margin-top: 4px;
}

.auth-alt {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--slate-100);
    font-size: 14.5px;
    text-align: center;
    color: var(--slate-600);
}

.auth-alt a {
    font-weight: 600;
    color: var(--teal-700);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.auth-alt a:hover {
    color: var(--teal-800);
    text-decoration-color: currentColor;
}

/* 08. Mensagens e estados ================================================= */
/* A região (role="alert") fica sempre no DOM; o aviso é inserido nela para ser anunciado. */
.auth-alert-region:empty {
    display: none;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    background: var(--rose-50);
    font-size: 14px;
    line-height: 1.5;
    color: #9f1239;
}

.auth-alert .icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.auth-alert--success {
    border-color: var(--teal-100);
    background: var(--teal-50);
    color: var(--teal-800);
}

.auth-state {
    text-align: center;
}

.auth-state[hidden],
[data-auth-step][hidden] {
    display: none;
}

.auth-state:focus {
    outline: none;
}

.auth-state-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border: 1px solid var(--teal-100);
    border-radius: 50%;
    color: var(--teal-700);
    background: var(--teal-50);
}

.auth-state-icon .icon {
    width: 30px;
    height: 30px;
}

.auth-state--error .auth-state-icon {
    border-color: var(--rose-100);
    color: var(--rose-600);
    background: var(--rose-50);
}

.auth-state p {
    margin: 12px auto 0;
    max-width: 380px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--slate-600);
    overflow-wrap: anywhere;
}

.auth-state p strong {
    color: var(--slate-900);
}

.auth-state .auth-state-note {
    font-size: 14px;
    color: var(--slate-500);
}

.auth-state-actions {
    display: grid;
    justify-items: center;
    gap: 16px;
    margin-top: 28px;
}

/* 09. DXP Contábil: marca, login social, cadastro e resumo ================ */
/* Marca: ícone do logo + nome em texto (o logo do Contábil é só o símbolo). */
.brand {
    gap: 10px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    color: #fff;
    white-space: nowrap;
}

.brand-name span {
    color: var(--teal-400);
}

.auth-top-brand .brand-name {
    font-size: 17px;
}

/* Só o link "Esqueceu a senha?" (sem "Manter conectado"): alinhado à direita. */
.auth-options--end {
    justify-content: flex-end;
}

/* Divisor "ou" entre o formulário e o login social */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-500);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

.auth-social {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

/* Aviso do login social (ex.: janela do Google bloqueada), entre o divisor e os botões. */
.auth-social-alert:not(:empty) {
    margin-top: 20px;
}

.btn-social {
    border-color: var(--slate-300);
    background: #fff;
    color: var(--slate-800);
    box-shadow: var(--shadow-xs);
}

.btn-social:hover {
    border-color: var(--slate-400);
    background: var(--slate-25);
}

/* Logos coloridos do Google e do Facebook (não usam o traço dos ícones da tela). */
.btn-social .brand-logo {
    width: 20px;
    height: 20px;
    flex: none;
}

/* Cadastro: CPF e data de nascimento lado a lado quando há espaço. */
.field-row {
    display: grid;
    gap: 18px;
}

/* Resumo do mês ilustrativo na coluna da marca (decorativo) */
.auth-summary {
    display: grid;
    gap: 14px;
    max-width: 400px;
    margin-top: 36px;
    padding: 18px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .035);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}

.auth-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-dark);
}

.auth-summary-head strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.auth-summary-head small {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    color: var(--teal-300);
}

.auth-summary-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    color: var(--navy-900);
    background: var(--teal-400);
}

.auth-summary-avatar .icon {
    width: 18px;
    height: 18px;
}

.auth-summary-total {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.auth-summary-list {
    display: grid;
    gap: 12px;
}

.auth-summary-list li {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--on-dark);
}

.auth-summary-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.auth-summary-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal-500), var(--teal-300));
}

.auth-summary-bar .is-alto {
    width: 78%;
}

.auth-summary-bar .is-medio {
    width: 50%;
}

.auth-summary-bar .is-baixo {
    width: 28%;
}

.auth-summary-value {
    color: var(--on-dark-muted);
    font-variant-numeric: tabular-nums;
}

.auth-summary-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(100, 172, 190, .2);
    border-radius: 12px;
    background: rgba(100, 172, 190, .1);
    font-size: 13px;
    color: var(--on-dark);
}

.auth-summary-card .icon {
    width: 18px;
    height: 18px;
    color: var(--teal-300);
}

.auth-summary-card strong {
    margin-left: auto;
    font-weight: 600;
    color: #fff;
}

/* 10. Responsivo e acessibilidade ========================================= */
@media (min-width: 1024px) {
    .auth {
        grid-template-columns: minmax(440px, 46%) minmax(0, 1fr);
    }

    .auth-aside {
        position: relative;
        isolation: isolate;
        display: block;
        overflow: hidden;
        background: var(--navy-900);
        color: var(--on-dark-muted);
    }

    /* Grade e brilho do fundo da marca (mesmo padrão do Agente de Cobrança). */
    .auth-aside::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -2;
        background-image:
            linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
        background-size: 56px 56px;
        -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 25%, transparent 75%);
        mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 25%, transparent 75%);
    }

    .auth-aside::after {
        content: "";
        position: absolute;
        top: -25%;
        right: -35%;
        z-index: -1;
        width: min(60vw, 760px);
        aspect-ratio: 1;
        border-radius: 50%;
        background: radial-gradient(closest-side, rgba(100, 172, 190, .18), rgba(100, 172, 190, .05) 55%, transparent 75%);
    }

    /* Com a coluna da marca visível, o topo do formulário fica claro e mostra só as ações. */
    .auth-page .auth-top {
        justify-content: flex-end;
        min-height: 0;
        padding: 24px clamp(24px, 4vw, 48px) 0;
        background: transparent;
        border-bottom: 0;
    }

    .auth-page .auth-top-brand {
        display: none;
    }

    .auth-page .auth-top :focus-visible {
        outline-color: var(--teal-700);
    }

    .auth-page .auth-top-link {
        border-color: var(--slate-300);
        background: #fff;
        color: var(--slate-800);
        box-shadow: var(--shadow-xs);
    }

    .auth-page .auth-top-link:hover {
        border-color: var(--slate-400);
        background: var(--slate-50);
    }

    .auth-top-text {
        font-size: 14px;
        color: var(--slate-600);
    }

    .auth-page .auth-foot {
        border-top: 0;
    }
}

/* Telas baixas: o resumo ilustrativo sai para o texto da marca caber sem rolar. */
@media (min-width: 1024px) and (max-height: 860px) {
    .auth-summary {
        display: none;
    }
}

@media (min-width: 420px) {
    .auth-social {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 480px) {
    .field-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 1023px) {
    /* O texto "Não tem conta?" ao lado do botão do topo só aparece com espaço. */
    .auth-top-text {
        display: none;
    }
}

@media (max-width: 479px) {
    .auth-top-link {
        padding-inline: 10px;
    }

    .auth-top-brand img {
        height: 32px;
    }
}

@media (max-width: 359px) {
    /* Só o ícone nos botões do topo, para a logo caber ao lado. */
    .auth-top-link {
        width: 40px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }
}

@media (forced-colors: active) {
    .auth-alert {
        border: 1px solid CanvasText;
    }

    .field-toggle,
    .auth-top-link,
    .btn-social {
        border: 1px solid ButtonText;
    }
}

/* 11. Organização: seleção, criação e convite ============================== */
/* Mesmo padrão dos cartões de empresa do Agente de Cobrança (company-card), com a paleta do Contábil. */
.auth-panel--wide {
    max-width: 760px;
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 14px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.org-grid > li {
    display: flex;
    min-width: 0;
}

.org-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-xs);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.org-card:hover {
    border-color: var(--teal-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.org-card[aria-disabled="true"] {
    cursor: progress;
    transform: none;
}

.org-card.is-current {
    border-color: var(--teal-400);
    background: var(--teal-50);
}

.org-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--navy-700);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.org-info {
    display: grid;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.org-name {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--slate-900);
    overflow-wrap: anywhere;
}

.org-meta {
    font-size: 13px;
    line-height: 1.4;
    color: var(--slate-500);
}

.org-go {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--slate-500);
}

.org-go .icon {
    width: 18px;
    height: 18px;
}

.org-card:hover .org-go {
    color: var(--teal-700);
    background: var(--teal-50);
}

.org-card .spinner {
    display: none;
    color: var(--teal-700);
}

.org-card.is-busy .spinner {
    display: inline-block;
}

.org-card.is-busy .org-go .icon {
    display: none;
}

.org-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--slate-500);
}

.org-divider::before,
.org-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

.org-create {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.org-create .field {
    margin: 0;
}

.org-create .btn {
    margin-top: 27px;
}

.invite-card {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 18px 20px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: var(--slate-25);
}

.invite-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14.5px;
    color: var(--slate-600);
}

.invite-row strong {
    color: var(--slate-900);
    text-align: right;
    overflow-wrap: anywhere;
}

.invite-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.invite-note {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--slate-600);
}

@media (max-width: 479px) {
    .org-create {
        grid-template-columns: 1fr;
    }

    .org-create .btn {
        margin-top: 0;
        width: 100%;
    }
}
