:root {
    --auth-aside-bg: #0f766e;
    --auth-aside-fg: #fff;
    --auth-aside-muted: #ccfbf1;
    --auth-aside-line: rgba(255, 255, 255, .07);
}

:root[data-theme="dark"] {
    --auth-aside-bg: #042f2e;
    --auth-aside-muted: #99f6e4;
    --auth-aside-line: rgba(255, 255, 255, .06);
}

body { background: var(--surface); }

.auth {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Painel da marca (somente desktop) */
.auth-aside {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 40px 48px;
    background-color: var(--auth-aside-bg);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .09), transparent 55%),
        linear-gradient(var(--auth-aside-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--auth-aside-line) 1px, transparent 1px);
    background-size: auto, 32px 32px, 32px 32px;
    color: var(--auth-aside-fg);
    overflow: hidden;
}

.auth-aside .auth-brand-icon { background: var(--auth-aside-fg); color: var(--auth-aside-bg); }

.auth-hero { max-width: 440px; }

.auth-hero-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.auth-hero-text { margin: 0 0 32px; color: var(--auth-aside-muted); font-size: 15px; }

.auth-features { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }

.auth-features li { display: flex; align-items: center; gap: 12px; font-weight: 500; }

.auth-features span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
}

.auth-aside-footer { margin: 0; color: var(--auth-aside-muted); font-size: 13px; }

/* Marca */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.auth-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--primary-fg);
}

/* Coluna do formulário */
.auth-main {
    display: flex;
    flex-direction: column;
    padding: 20px 16px 32px;
    background: var(--bg);
}

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

.auth-theme { margin-left: auto; }
.auth-theme .icon-dark,
:root[data-theme="dark"] .auth-theme .icon-light { display: none; }
:root[data-theme="dark"] .auth-theme .icon-dark { display: block; }

.auth-panel {
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding: 32px 0;
    animation: auth-in .3s ease both;
}

@keyframes auth-in { from { transform: translateY(8px); opacity: 0; } }

.auth-header { margin-bottom: 24px; }
.auth-header-center { text-align: center; }

.auth-header-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.auth-header-icon svg { width: 20px; height: 20px; }
.auth-header-icon-lg { width: 64px; height: 64px; border-radius: 50%; }
.auth-header-icon-lg svg { width: 28px; height: 28px; }

.auth-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.auth-subtitle { margin: 0; color: var(--muted); }

.auth-form .input { height: 44px; border-radius: 8px; transition: border-color .12s ease, box-shadow .12s ease; }
.auth-form .input::placeholder { color: var(--muted); opacity: .7; }
.auth-form .input:hover { border-color: var(--muted); }
.auth-form .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.auth-form .input-icon:focus-within > svg { color: var(--text); }
.auth-form .check { margin-bottom: 20px; }
.auth-form .btn-primary { margin-top: 4px; }

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.auth-label-row label { margin-bottom: 0; }

/* Campo de senha com botão de mostrar/ocultar */
.input-password > .input { padding-right: 44px; }

.input-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.input-password-toggle:hover { background: var(--accent); color: var(--text); }
.input-password-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.input-password-toggle .icon-hide,
.input-password-toggle[aria-pressed="true"] .icon-show { display: none; }
.input-password-toggle[aria-pressed="true"] .icon-hide { display: block; }

.auth-link {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    transition: text-decoration-color .12s ease;
}

.auth-link:hover { text-decoration-color: currentColor; }

.auth-link-button { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.auth-link-button:disabled { color: var(--muted); text-decoration: none; cursor: not-allowed; }
.auth-link-button span { font-variant-numeric: tabular-nums; }

.auth-footnote {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--muted);
    font-weight: 500;
}

.auth-back:hover { color: var(--text); }

.auth-panel .alert { border-radius: 8px; }

@media (min-width: 960px) {
    .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-aside { display: flex; }
    .auth-brand-mobile { display: none; }
    .auth-main { padding: 24px 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel, .btn.is-loading::after { animation: none; }
}
