/* ============================================================
   Login premium minimalista — split-screen (marca | formulário)
   Carregado apenas pelo layout layouts/auth.php
   ============================================================ */

body.auth-shell {
    background: var(--bg);
    padding: 0;
}

body.auth-shell::before {
    display: none;
}

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* ---------- Painel de marca (esquerda) ---------- */
.auth-brandside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 56px 40px;
    color: #fff;
    background:
        radial-gradient(120% 120% at 0% 0%, #1b1550 0%, transparent 55%),
        linear-gradient(155deg, #0a0f2c 0%, #131a45 55%, #1a1140 100%);
}

/* brilhos suaves */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
}

.auth-orb-1 {
    width: 360px;
    height: 360px;
    top: -90px;
    right: -60px;
    background: radial-gradient(circle, rgba(91, 46, 255, 0.65), transparent 70%);
}

.auth-orb-2 {
    width: 320px;
    height: 320px;
    bottom: -80px;
    left: -40px;
    background: radial-gradient(circle, rgba(255, 46, 142, 0.4), transparent 70%);
}

/* grade técnica discreta */
.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
    pointer-events: none;
}

.auth-brandside-inner {
    position: relative;
    z-index: 1;
    margin: auto 0;
    max-width: 440px;
    animation: auth-fade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-brandside-logo {
    margin-bottom: 38px;
}

.auth-brandside-title {
    margin: 0 0 16px;
    font-size: 2.05rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-brandside-text {
    margin: 0 0 30px;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    max-width: 400px;
}

.auth-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-highlights svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    padding: 5px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--violet), var(--blue));
}

.auth-brandside-foot {
    position: relative;
    z-index: 1;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- Formulário (direita) ---------- */
.auth-formside {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 102, 255, 0.06), transparent),
        var(--bg);
}

.auth-formside-inner {
    width: 100%;
    max-width: 380px;
    animation: auth-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* logo compacto só no mobile */
.auth-mobile-brand {
    display: none;
    margin-bottom: 26px;
}

.auth-header {
    margin-bottom: 26px;
}

.auth-header h1 {
    margin: 0 0 7px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
}

.auth-subtitle {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 74, 106, 0.07);
    border: 1px solid rgba(255, 74, 106, 0.25);
    color: #c01e44;
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-alert svg {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(10, 15, 44, 0.14);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input::placeholder {
    color: rgba(95, 103, 132, 0.55);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 44px;
}

.auth-toggle-password {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-toggle-password:hover {
    color: var(--text);
    background: rgba(10, 15, 44, 0.05);
}

.auth-toggle-password svg {
    width: 18px;
    height: 18px;
}

.auth-toggle-password svg[hidden] {
    display: none;
}

.auth-submit {
    position: relative;
    margin-top: 6px;
    padding: 13px 16px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #5b2eff 0%, #0066ff 100%);
    color: #fff;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(91, 46, 255, 0.34);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.auth-submit[disabled] {
    cursor: wait;
    opacity: 0.85;
}

.auth-submit-spinner {
    display: none;
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
}

.auth-submit.is-loading .auth-submit-spinner {
    display: block;
    animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-demo {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--stroke);
    text-align: center;
}

.auth-demo-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 102, 255, 0.08);
    color: var(--blue);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-demo p {
    margin: 9px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.auth-demo code {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(10, 15, 44, 0.05);
    font-size: 0.78rem;
    color: var(--text);
}

/* ---------- Responsivo ---------- */
@media (max-width: 880px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    /* No mobile, esconde o painel de marca e mostra o logo compacto. */
    .auth-brandside {
        display: none;
    }

    .auth-mobile-brand {
        display: flex;
        justify-content: center;
    }

    .auth-header {
        text-align: center;
    }

    .auth-formside {
        min-height: 100vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-formside-inner,
    .auth-brandside-inner {
        animation: none;
    }
    .auth-submit.is-loading .auth-submit-spinner {
        animation-duration: 1.4s;
    }
}
