/* AgentRank — Login premium (auth-page) */

.auth-page {
    --auth-navy-950: #050b14;
    --auth-navy-900: #07111f;
    --auth-navy-850: #0b1628;
    --auth-cyan-500: #25bfd3;
    --auth-cyan-400: #38d6e8;
    --auth-blue-600: #2563eb;
    --auth-text: #101828;
    --auth-muted: #667085;
    --auth-border: #d0d5dd;
    min-height: 100dvh;
    background: var(--auth-navy-950);
}

.auth-shell {
    display: grid;
    grid-template-columns: 58% 42%;
    min-height: 100dvh;
}

/* ── Coluna esquerda: imagem + marca ── */
.auth-brand-panel {
    position: relative;
    min-height: 100dvh;
    background:
        url('../../branding/login-hero.png?v=2') center center / cover no-repeat;
    overflow: hidden;
}

.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(5, 11, 20, 0.88) 0%, rgba(5, 11, 20, 0.55) 45%, rgba(5, 11, 20, 0.35) 100%),
        linear-gradient(180deg, transparent 40%, rgba(5, 11, 20, 0.75) 100%),
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(37, 191, 211, 0.22), transparent 55%);
    pointer-events: none;
}

.auth-brand-glow {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(37, 191, 211, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-logo {
    position: absolute;
    top: 32px;
    left: 40px;
    z-index: 2;
}

.auth-brand-logo .ar-brand-logo--lg {
    max-height: 48px;
}

.auth-brand-content {
    position: absolute;
    left: 40px;
    bottom: 12%;
    z-index: 2;
    max-width: 520px;
    padding-right: 24px;
}

.auth-brand-accent {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--auth-cyan-500), var(--auth-blue-600));
    border-radius: 2px;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(37, 191, 211, 0.45);
}

.auth-brand-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 16px;
}

.auth-brand-text {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 24px;
    max-width: 480px;
}

.auth-brand-badges {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-brand-badges li {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(37, 191, 211, 0.35);
    backdrop-filter: blur(4px);
}

/* ── Coluna direita: login ── */
.auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 32px 40px;
    background:
        radial-gradient(circle at top right, rgba(37, 191, 211, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.14), transparent 30%),
        var(--auth-navy-950);
}

.auth-language-switcher {
    position: absolute;
    top: 28px;
    right: 32px;
    z-index: 5;
}

.auth-language-switcher .ar-lang-switcher {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.auth-language-switcher .ar-lang-btn {
    color: rgba(255, 255, 255, 0.65);
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.auth-language-switcher .ar-lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-language-switcher .ar-lang-btn.is-active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--auth-navy-950);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 24px;
    padding: 44px 40px 36px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(228, 234, 242, 0.9);
}

.auth-card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.auth-card-logo .ar-brand-logo--md {
    max-height: 40px;
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-text);
    margin: 0 0 10px;
    text-align: center;
    line-height: 1.25;
}

.auth-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-muted);
    margin: 0 0 28px;
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 14px;
    font-family: var(--ar-font-sans);
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
    color: #98a2b3;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-cyan-500);
    box-shadow: 0 0 0 3px rgba(37, 191, 211, 0.18);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.auth-password-toggle:hover {
    color: var(--auth-text);
    background: #f2f4f7;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid var(--auth-cyan-500);
    outline-offset: 2px;
}

.auth-password-icon[hidden] {
    display: none !important;
}

.auth-submit {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--ar-font-sans);
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--auth-cyan-500) 0%, var(--auth-blue-600) 100%);
    box-shadow: 0 8px 24px rgba(37, 191, 211, 0.35);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.auth-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 12px 28px rgba(37, 191, 211, 0.45);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-submit:focus-visible {
    outline: 2px solid var(--auth-cyan-400);
    outline-offset: 3px;
}

.auth-secure-note {
    font-size: 11px;
    color: var(--auth-muted);
    text-align: center;
    margin: 20px 0 0;
    line-height: 1.4;
}

.auth-dev-note {
    font-size: 10px;
    color: #98a2b3;
    text-align: center;
    margin: 8px 0 0;
}

/* Body + flash */
.ar-body-login {
    background: var(--auth-navy-950, #050b14);
}

.ar-body-login .ar-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 420px;
    width: calc(100% - 32px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* Tablet */
@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 52% 48%;
    }

    .auth-brand-content {
        left: 28px;
        bottom: 10%;
        max-width: 90%;
    }

    .auth-panel {
        padding: 28px 24px;
    }

    .auth-card {
        padding: 36px 28px 32px;
        max-width: 420px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-brand-panel {
        min-height: 38vh;
        max-height: 42vh;
    }

    .auth-brand-content {
        left: 20px;
        right: 20px;
        bottom: 24px;
        max-width: none;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-brand-text {
        font-size: 13px;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .auth-brand-badges {
        gap: 6px;
    }

    .auth-brand-badges li {
        font-size: 10px;
        padding: 6px 10px;
    }

    .auth-brand-logo {
        top: 20px;
        left: 20px;
    }

    .auth-brand-logo .ar-brand-logo--lg {
        max-height: 36px;
    }

    .auth-panel {
        min-height: auto;
        padding: 24px 20px 32px;
        align-items: flex-start;
    }

    .auth-language-switcher {
        top: 16px;
        right: 16px;
    }

    .auth-card {
        max-width: none;
        margin-top: 8px;
        padding: 32px 24px 28px;
    }
}

@media (max-width: 390px) {
    .auth-brand-panel {
        min-height: 32vh;
    }

    .auth-brand-text {
        display: none;
    }

    .auth-title {
        font-size: 20px;
    }
}
