/* =========================================================
   Auth pages
   Login, password forms, legacy auth wrappers
   ========================================================= */

.login-page {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.login-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    width: 100%;
    max-width: 460px;
    padding: 48px 42px 42px;

    border-radius: 34px;
    background:
        radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));

    border: 1px solid rgba(148, 163, 184, 0.16);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.46),
        0 0 70px rgba(56, 189, 248, 0.10);

    animation: loginAppear 0.7s ease;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
        radial-gradient(circle at 15% 100%, rgba(124, 58, 237, 0.13), transparent 34%);
}

.login-card::after {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    bottom: -120px;
    left: 50%;

    transform: translateX(-50%);

    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.28),
        transparent 70%
    );

    filter: blur(50px);

    z-index: -1;
}

.login-logo {
    width: fit-content;
    margin: 0 auto 18px;
    padding: 8px 16px;

    border-radius: 999px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.24);

    color: #38bdf8;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.login-title {
    margin: 0;

    text-align: center;

    color: #f8fafc;

    font-size: 44px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -1.2px;
}

.login-subtitle {
    max-width: 320px;
    margin: 14px auto 34px;

    color: #94a3b8;

    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    margin: 0;

    color: #cbd5e1;

    font-size: 14px;
    font-weight: 800;
}

.login-field input {
    width: 100%;
    height: 56px;

    padding: 0 18px;

    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);

    background: rgba(2, 6, 23, 0.46);
    color: #f8fafc;

    font-size: 16px;
    outline: none;
    box-shadow: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-field input:hover {
    border-color: rgba(56, 189, 248, 0.45);
}

.login-field input:focus {
    border-color: rgba(56, 189, 248, 0.85);
    background: rgba(2, 6, 23, 0.62);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.login-btn {
    width: 100%;
    height: 58px;
    margin-top: 8px;
    padding: 0;

    border: none;
    border-radius: 18px;

    background: linear-gradient(135deg, #38bdf8, #2563eb, #7c3aed);
    color: #ffffff;

    font-size: 17px;
    font-weight: 900;

    cursor: pointer;

    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 24px 55px rgba(37, 99, 235, 0.45);
}

.login-links {
    margin-top: 28px;

    text-align: center;

    color: #cbd5e1;

    font-size: 15px;
}

.login-links a {
    color: #38bdf8;

    text-decoration: none;
    font-weight: 800;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-links p {
    margin: 14px 0 0;
}

/* Legacy compatibility for older auth templates */

.auth-page,
.ogelogin-wrapper {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.auth-card,
.ogelogin-card {
    width: 100%;
    max-width: 460px;
    padding: 48px 42px 42px;

    border-radius: 34px;

    background:
        radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));

    border: 1px solid rgba(148, 163, 184, 0.16);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.46),
        0 0 70px rgba(56, 189, 248, 0.10);
}

/* Password visibility button */

.password-wrapper {
    position: relative !important;
    width: 100% !important;
}

.password-wrapper input {
    width: 100% !important;
    padding-right: 58px !important;
}

.toggle-password {
    position: absolute !important;

    top: 50% !important;
    right: 18px !important;

    transform: translateY(-50%) !important;

    width: 34px !important;
    height: 34px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 50% !important;

    background: transparent !important;
    box-shadow: none !important;

    color: #94a3b8 !important;

    font-size: 18px !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

.toggle-password:hover {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.10) !important;

    transform: translateY(-50%) !important;
    box-shadow: none !important;
}

.toggle-password:active {
    color: #ffffff !important;
    background: rgba(56, 189, 248, 0.16) !important;

    transform: translateY(-50%) scale(0.96) !important;
    box-shadow: none !important;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(26px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .login-page,
    .auth-page,
    .ogelogin-wrapper {
        min-height: auto;
        padding: 46px 16px 80px;
    }

    .login-card,
    .auth-card,
    .ogelogin-card {
        padding: 34px 24px;
        border-radius: 28px;
    }

    .login-title {
        font-size: 36px;
    }

    .login-subtitle {
        margin-bottom: 28px;
    }
}