:root {
    --primary-green: #0F2E22;
    --accent-gold: #c5a059;
    --gold-glow: rgba(197, 160, 89, 0.5);
    --input-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #1a1a1a;
    --text-white: #ffffff;
}

body,
html {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-green);
    overflow: hidden !important;
    position: fixed;
}

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-image: url("../../media/img/bg/bg-12.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20%;
    z-index: 1;
}

/* Stronger Overlay */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(15, 46, 34, 0.9) 0%, rgba(15, 46, 34, 0.4) 50%, rgba(15, 46, 34, 0.9) 100%);
    z-index: 1;
}

.login-card {
    width: 360px;
    max-height: 90vh;
    background: rgba(15, 46, 34, 0.8);
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    border-radius: 35px;
    padding: 45px 35px;
    z-index: 10;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.8s ease-out;
    overflow: hidden;
}

/* Premium Metallic Glowing Border */
.login-card::before {
    content: '';
    position: absolute;
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;
    border-radius: 31px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent, #c5a059) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: 110px;
    filter: brightness(12) contrast(1.2) drop-shadow(0 0 20px rgba(197, 160, 89, 0.7)) !important;
}

.login-title {
    color: var(--text-white);
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #bfa110;
    font-size: 1.2rem;
    z-index: 5;
}

.form-control {
    background: rgba(229, 237, 255, 0.95) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 15px 20px 15px 55px !important;
    color: #1a1a1a !important;
    height: 56px !important;
    /* Smaller height */
    width: 100%;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    background: #ffffff !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(197, 160, 89, 0.2) !important;
    transform: translateY(-3px);
    outline: none !important;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.btn-login {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #d4af37 0%, #a67c00 100%);
    border: none;
    border-radius: 14px;
    color: #0f2e22;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(197, 160, 89, 0.4);
    filter: brightness(1.1);
}

.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.login-footer a:hover {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 12px;
    width: 22px;
    height: 22px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(150px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error Alert Styling */
.m-login__errors .alert {
    background: rgba(244, 81, 108, 0.15) !important;
    border: 1px solid rgba(244, 81, 108, 0.3) !important;
    color: #ff607d !important;
    border-radius: 15px !important;
    margin-bottom: 30px !important;
    padding: 12px 20px;
    backdrop-filter: blur(5px);
}

/* Loading Spinner */
.btn-login.loading {
    position: relative;
    color: transparent !important;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    top: 50%;
    left: 50%;
    margin-top: -14px;
    margin-left: -14px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #0f2e22;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RESPONSIVENESS */
@media (max-width: 1200px) {
    .login-page {
        padding-left: 0;
        justify-content: center;
    }
}

@media (max-width: 850px) {
    .login-card {
        width: 100%;
        max-width: 420px;
        margin: 0 20px;
        padding: 45px 30px;
    }
}