/* ═══════════════════════════════════════════════════════════════
   Login Page — Dark Theme (App-like two-step)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page / Overlay ─── */
.login-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 700px 600px at 0% 60%, rgba(88,28,200,.28) 0%, transparent 65%),
        radial-gradient(ellipse 500px 400px at 100% 0%, rgba(60,10,160,.18) 0%, transparent 60%),
        #0b0d18;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-page::before {
    content: '';
    position: fixed;
    top: -120px;
    left: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88,28,200,.12) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Container ─── */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 48px 28px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    animation: loginContainerIn 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes loginContainerIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Brand ─── */
.login-brand {
    text-align: center;
    margin-bottom: 44px;
    width: 100%;
}

.login-badge {
    width: 76px;
    height: 76px;
    margin: 0 0 26px;
    border-radius: 22px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 14px 44px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(255, 255, 255, 0.03);
}

.login-badge img {
    width: 56px;
    height: 56px;
    filter: invert(1);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #6d28d9;
    letter-spacing: -1.5px;
    margin: 0 auto 18px;
    box-shadow: 0 6px 28px rgba(0,0,0,.45);
}

.login-brand-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .55em;
    color: rgba(255,255,255,.85);
    margin-bottom: 10px;
    text-align: center;
}

.login-brand-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .3em;
    color: rgba(255,255,255,.35);
}

.login-brand-sub::before,
.login-brand-sub::after {
    content: '';
    display: block;
    height: 1px;
    width: 36px;
    background: rgba(255,255,255,.18);
}

.login-title {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 7px;
    font-weight: 400 !important;
}

.login-title-bold {
    font-weight: 300 !important;
}

.login-title-light {
    font-weight: 300 !important;
}

.login-subtitle {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.32);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.login-subtitle::before,
.login-subtitle::after {
    content: '';
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

/* ─── Form ─── */
.login-form {
    width: 100%;
}

/* ─── Steps ─── */
.login-step {
    width: 100%;
    display: none;
}

.login-step--active {
    display: block;
}

.login-step--slide-right {
    animation: loginSlideRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.login-step--slide-left {
    animation: loginSlideLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes loginSlideRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes loginSlideLeft {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Step header ─── */
.login-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.login-step-label {
    color: #a78bfa;
    font-size: 13px;
    font-weight: 400 !important;
    letter-spacing: 0.3px;
}

.login-step-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.login-dot {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.10);
    transition: background 0.3s;
}

.login-dot--active {
    background: rgba(255, 255, 255, 0.82);
}

/* ─── Step title + desc ─── */
.login-step-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700 !important;
    line-height: 1.15;
}

.login-step-desc {
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    font-weight: 400 !important;
    line-height: 1.5;
}

/* ─── Input field ─── */
.login-field {
    position: relative;
    margin-bottom: 24px;
}

.login-field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.28);
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.login-input {
    width: 100%;
    height: 58px;
    padding: 0 20px 0 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 16px;
    font-weight: 400 !important;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.login-input:focus {
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

/* ─── Password eye toggle ─── */
.login-field--has-eye .login-input {
    padding-right: 52px;
}

.login-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.28);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 1;
}

.login-eye:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ─── Error shake ─── */
@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

.login-field--error .login-input {
    border-color: rgba(255, 80, 80, 0.55) !important;
    animation: loginShake 0.4s ease;
}

/* ─── Back button ─── */
.login-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    margin-bottom: 22px;
    padding: 0;
}

.login-back:hover {
    border-color: rgba(255, 255, 255, 0.20);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

/* ─── Remember me ─── */
.login-meta {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.login-remember input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 42px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.10);
    position: relative;
    cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0;
    border: none;
    outline: none;
    margin: 0;
}

.login-remember input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-remember input[type="checkbox"]:checked {
    background: rgba(255, 255, 255, 0.22);
}

.login-remember input[type="checkbox"]:checked::after {
    left: 23px;
    background: #ffffff;
}

.login-remember span {
    color: rgba(255, 255, 255, 0.38);
    font-size: 13px;
    font-weight: 400 !important;
}

/* ─── Glass card ─── */
.login-card {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 22px;
}

.login-card .login-field {
    margin-bottom: 14px;
}

.login-card .login-meta {
    margin-bottom: 14px;
}

/* ─── Button ─── */
.login-btn {
    width: 100%;
    height: 56px;
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

.login-btn:active {
    transform: scale(0.985);
}

.login-btn--primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 22px rgba(109,40,217,.55);
}

.login-btn--primary:hover {
    background: linear-gradient(135deg, #8b46f0 0%, #7c3aed 100%);
    border-color: transparent;
    color: white;
    opacity: 1;
}

/* ─── Footer ─── */
.login-footer {
    margin-top: 44px;
    text-align: center;
    width: 100%;
}

.login-footer p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 14px;
    font-weight: 400 !important;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-weight: 600 !important;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #ffffff;
}

.login-dev {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.13);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-dev::before,
.login-dev::after {
    content: '';
    width: 36px;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

/* ─── Pesquisas anonimas ─── */
.login-pesquisas {
    margin-top: 28px;
    width: 100%;
}

.login-pesquisa-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400 !important;
    transition: all 0.2s;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.login-pesquisa-link:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
}

/* ═══════════════════════════════════════════════════════════════
   Registration — extends dark theme
   ═══════════════════════════════════════════════════════════════ */

.login-page--register {
    align-items: flex-start;
}

.login-container--register {
    justify-content: flex-start;
    padding-top: 64px;
    padding-bottom: 64px;
}

.login-container--register .login-brand {
    margin-bottom: 36px;
}

.login-field-group {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.40);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500 !important;
}

.login-container--register .login-field {
    margin-bottom: 0;
}

.login-container--register .login-input {
    height: 50px;
    font-size: 14px;
    border-radius: 14px;
}

.login-select {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400 !important;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    cursor: pointer;
}

.login-select option {
    background: #1a1a1f;
    color: #ffffff;
}

.login-select:focus {
    border-color: rgba(255, 255, 255, 0.20);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.login-container--register .login-btn {
    margin-top: 8px;
}

.login-container--register .login-footer {
    margin-top: 28px;
}

/* ─── Responsive ─── */
@media (max-width: 575.98px) {
    .login-container {
        padding: 36px 22px 32px;
    }

    .login-brand {
        margin-bottom: 44px;
    }

    .login-badge {
        width: 68px;
        height: 68px;
    }

    .login-badge img {
        width: 50px;
        height: 50px;
    }

    .login-title {
        font-size: 24px;
        letter-spacing: 5px;
    }

    .login-step-title {
        font-size: 24px;
    }

    .login-step-desc {
        margin-bottom: 26px;
    }
}

@media (min-height: 800px) {
    .login-container {
        min-height: auto;
    }
}
