@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --login-bg: #0f1117;
    --login-surface: rgba(18, 21, 28, 0.78);
    --login-surface-soft: rgba(255, 255, 255, 0.06);
    --login-border: rgba(255, 255, 255, 0.08);
    --login-text: #ffffff;
    --login-muted: #aeb7c4;
    --login-accent: #ce0000;
    --login-accent-dark: #a60000;
    --login-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--login-bg);
    color: var(--login-text);
    min-height: 100vh;
}

.login-hero {
    position: relative;
    top: 0;
    min-height: calc(100vh - 60px);
    padding: 72px 24px 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(0.22);
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(206, 0, 0, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(8, 10, 14, 0.26), rgba(8, 10, 14, 0.82));
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: stretch;
}

.login-panel,
.signup-panel {
    border: 1px solid var(--login-border);
    border-radius: 22px;
    backdrop-filter: blur(14px);
    box-shadow: var(--login-shadow);
}

.login-panel {
    background: var(--login-surface);
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 470px;
}

.panel-kicker,
.signup-badge {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.panel-kicker {
    background: rgba(206, 0, 0, 0.15);
    color: #ff8f8f;
    margin-bottom: 14px;
}

.login-panel h1 {
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
    margin-bottom: 10px;
}

.panel-copy {
    max-width: 460px;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.field-label {
    display: block;
    font-size: 12px;
    color: var(--login-muted);
    font-weight: 600;
}

.input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: var(--login-text);
    outline: none;
    font-size: 14px;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input:focus {
    border-color: rgba(206, 0, 0, 0.9);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(206, 0, 0, 0.12);
}

.login-actions,
.signup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.btn,
.btn-light {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

.btn {
    background: var(--login-accent);
    color: #fff;
}

.btn:hover,
.btn:focus-visible {
    background: var(--login-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(206, 0, 0, 0.28);
}

.btn-light {
    background: #fff;
    color: var(--login-accent);
}

.btn-light:hover,
.btn-light:focus-visible {
    background: #f4f4f4;
    transform: translateY(-1px);
}

.text-link {
    width: fit-content;
    color: var(--login-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.support-strip {
    margin-top: 18px;
    padding: 14px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.support-strip .material-symbols-outlined {
    color: #ff8f8f;
    font-size: 20px;
}

.support-strip p {
    color: var(--login-muted);
    line-height: 1.5;
    font-size: 13px;
}

.signup-panel {
    background: linear-gradient(180deg, rgba(147, 0, 0, 0.9), rgba(90, 0, 0, 0.94));
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    min-height: 470px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.signup-panel.highlighted {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 24px 48px rgba(206, 0, 0, 0.28);
}

.signup-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.signup-panel h2 {
    font-size: 24px;
    line-height: 1.15;
}

.signup-panel p {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
    font-size: 14px;
}

.benefit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
    font-size: 14px;
}

.benefit-list .material-symbols-outlined {
    font-size: 18px;
    color: #ffd7d7;
}

.text-link-light {
    color: #fff;
    opacity: 0.9;
}

.text-link-light:hover {
    opacity: 1;
}

/* ─── Inputs do código ─────────────────────────────── */
.code-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s;
}

.code-input:focus {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185,28,28,.15);
}

/* ─── Reenviar ─────────────────────────────────────── */
.resend-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    color: #6b7280;
    margin-top: 16px;
}

.resend-strip .text-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.resend-strip .text-link:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ─── Alert box ────────────────────────────────────────── */
.alert {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border-left: 3px solid transparent;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    animation: alertIn .2s ease;
}

.alert.show {
    display: flex;
}

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.alert-icon-wrap .material-symbols-outlined {
    font-size: 18px;
}

.alert-close {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: .5;
    display: flex;
    align-items: center;
    transition: opacity .2s;
}

.alert-close:hover { opacity: 1; }

.alert-close .material-symbols-outlined {
    font-size: 16px;
}

.alert-error {
    background: rgba(206, 0, 0, 0.08);
    border-color: rgba(206, 0, 0, 0.6);
    color: #ffaaaa;
}

.alert-error .alert-icon-wrap .material-symbols-outlined,
.alert-error .alert-close { color: #ff8f8f; }

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.alert-success .alert-icon-wrap .material-symbols-outlined,
.alert-success .alert-close { color: #86efac; }

/* ─── Esqueci minha senha ───────────────────────────────── */
.forgot-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--login-muted);
    text-align: center;
}

.forgot-link:hover {
    color: var(--login-text);
    text-decoration: underline;
}

/* ─── Divisor Google ────────────────────────────────────── */
.google-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: rgba(255,255,255,.25);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.google-divider::before,
.google-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.08);
}

.google-btn-wrap {
    margin-bottom: 22px;
}

/* ─── Reset password — voltar link ─────────────────────── */
.reset-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--login-muted);
    text-decoration: none;
    margin-bottom: 20px;
    transition: color .2s;
}

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

.reset-back .material-symbols-outlined {
    font-size: 16px;
}

/* ─── Reset password — cards de método ──────────────────── */
.method-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.method-list form {
    width: 100%;
}

.method-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--login-border);
    background: var(--login-surface-soft);
    color: var(--login-text);
    cursor: pointer;
    text-align: left;
    transition: border-color .2s, background .2s;
}

.method-card:hover {
    border-color: rgba(206, 0, 0, 0.5);
    background: rgba(255,255,255,.08);
}

.method-card-icon {
    font-size: 22px;
    color: var(--login-accent);
    flex-shrink: 0;
}

.method-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.method-card-text strong {
    font-size: 14px;
    font-weight: 700;
}

.method-card-text span {
    font-size: 12px;
    color: var(--login-muted);
}

.method-card-arrow {
    font-size: 20px;
    color: var(--login-muted);
    flex-shrink: 0;
}

/* ─── Token page — painel único centralizado ───────────── */
.login-shell--single {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
}

/* ─── Separador no resend-strip ────────────────────────── */
.resend-divider {
    color: #6b7280;
    font-size: .875rem;
    user-select: none;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-panel,
    .signup-panel {
        padding: 28px 24px;
    }
}

@media (max-width: 720px) {
    .login-hero {
        min-height: auto;
        padding: 98px 16px 64px;
    }

    .login-panel,
    .signup-panel {
        border-radius: 18px;
        padding: 24px 18px;
    }

    .login-panel h1 {
        font-size: 28px;
    }

    .signup-panel h2 {
        font-size: 22px;
    }
}
