/* Login page — Malaysia Linguistics Lab theme (login only). */

.login-page {
    width: 100%;
    max-width: 440px;
    margin: 1.25rem auto 2.5rem;
    padding: 0 0.25rem;
}

.login-panel {
    width: 100%;
    padding: 1.65rem 1.45rem 1.5rem;
    border-radius: 18px;
    background:
        linear-gradient(
            165deg,
            rgba(14, 48, 40, 0.92),
            rgba(7, 24, 20, 0.94)
        );
    border: 1px solid rgba(88, 196, 180, 0.28);
    box-shadow:
        0 0 0 1px rgba(239, 215, 126, 0.06),
        0 18px 42px rgba(0, 0, 0, 0.35),
        0 0 36px rgba(69, 156, 144, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.login-brand {
    display: block;
    margin: 0 0 0.35rem;
    color: #efd77e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-panel h2 {
    margin: 0 0 1.35rem;
    color: #efd77e;
    font-size: clamp(1.55rem, 3.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 0 18px rgba(239, 215, 126, 0.18);
}

.login-panel .form-label {
    color: #efd77e;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.login-panel .form-control {
    background: rgba(8, 32, 28, 0.88) !important;
    color: #f3f7f4 !important;
    border: 1px solid rgba(88, 196, 180, 0.42) !important;
    border-radius: 12px !important;
    min-height: 46px;
    padding: 0.65rem 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.login-panel .form-control::placeholder {
    color: rgba(210, 230, 220, 0.38);
}

.login-panel .form-control:hover {
    border-color: rgba(120, 220, 200, 0.55) !important;
}

.login-panel .form-control:focus {
    background: rgba(10, 40, 34, 0.95) !important;
    color: #ffffff !important;
    border-color: rgba(239, 215, 126, 0.65) !important;
    box-shadow:
        0 0 0 3px rgba(88, 196, 180, 0.22),
        0 0 18px rgba(239, 215, 126, 0.12) !important;
    outline: none;
}

.login-panel .form-control:-webkit-autofill,
.login-panel .form-control:-webkit-autofill:hover,
.login-panel .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #f3f7f4;
    caret-color: #f3f7f4;
    box-shadow: 0 0 0 1000px rgba(8, 32, 28, 0.96) inset !important;
    transition: background-color 99999s ease-out;
}

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

.password-field-wrap .form-control {
    padding-right: 4.5rem !important;
}

.show-password-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #efd77e;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.show-password-button:hover,
.show-password-button:focus-visible {
    color: #ffe9a8;
    outline: none;
}

.forgot-password-row {
    display: flex;
    justify-content: flex-end;
    margin: -0.15rem 0 1.1rem;
}

.forgot-password-row a {
    color: #7fd4c4;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.forgot-password-row a:hover,
.forgot-password-row a:focus-visible {
    color: #efd77e;
    text-decoration: underline;
}

.login-panel .btn-login {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(239, 215, 126, 0.45);
    border-radius: 12px;
    background:
        linear-gradient(
            180deg,
            rgba(45, 130, 112, 0.95),
            rgba(22, 78, 68, 0.98)
        );
    color: #efd77e;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(88, 196, 180, 0.16);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.login-panel .btn-login:hover {
    transform: translateY(-1px);
    border-color: rgba(239, 215, 126, 0.7);
    color: #fff4c4;
    background:
        linear-gradient(
            180deg,
            rgba(55, 150, 130, 0.98),
            rgba(28, 92, 80, 1)
        );
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.32),
        0 0 22px rgba(239, 215, 126, 0.14);
}

.login-panel .btn-login:focus-visible {
    outline: 3px solid rgba(239, 215, 126, 0.45);
    outline-offset: 2px;
}

/* Flash messages must remain readable even if CDN Bootstrap CSS is blocked. */
.login-page .alert,
.alert.alert-info {
    display: block;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(88, 196, 180, 0.35);
    background: rgba(12, 48, 42, 0.92);
    color: #efd77e;
    font-weight: 600;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 1.35rem 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(88, 196, 180, 0.45),
        transparent
    );
}

.login-divider span {
    color: #efd77e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
}

.google-login-button {
    position: relative;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px 10px 44px;
    background: rgba(10, 36, 32, 0.9);
    color: #f2f7f4;
    border: 1px solid rgba(88, 196, 180, 0.4);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease,
        color 0.18s ease;
}

.google-login-button:hover {
    background: rgba(16, 52, 46, 0.96);
    color: #efd77e;
    border-color: rgba(239, 215, 126, 0.45);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.28),
        0 0 16px rgba(88, 196, 180, 0.14);
    transform: translateY(-1px);
    text-decoration: none;
}

.google-login-button:focus-visible {
    outline: 3px solid rgba(88, 196, 180, 0.4);
    outline-offset: 2px;
}

.google-login-icon-wrap {
    position: absolute;
    left: 14px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-login-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.login-register-text {
    margin: 1.25rem 0 0;
    text-align: center;
    color: rgba(220, 236, 228, 0.82);
    font-size: 0.92rem;
    line-height: 1.45;
}

.login-register-text a {
    color: #efd77e;
    font-weight: 700;
    text-decoration: none;
}

.login-register-text a:hover,
.login-register-text a:focus-visible {
    color: #ffe9a8;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .login-page {
        margin: 0.65rem auto 1.75rem;
        max-width: 100%;
    }

    .login-panel {
        padding: 1.35rem 1.1rem 1.25rem;
        border-radius: 16px;
    }

    .login-panel h2 {
        margin-bottom: 1.1rem;
        font-size: 1.45rem;
    }

    .login-panel .mb-3 {
        margin-bottom: 0.85rem !important;
    }

    .forgot-password-row {
        margin-bottom: 0.95rem;
    }

    .login-divider {
        margin: 1.1rem 0;
    }

    .google-login-button {
        padding-left: 40px;
        font-size: 0.88rem;
    }
}

@media (min-width: 900px) {
    .login-page {
        margin-top: 2rem;
        margin-bottom: 3rem;
    }

    .login-panel {
        padding: 2rem 1.85rem 1.75rem;
    }
}
