@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --secondary: #0f172a;
    --accent: #fbbf24;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    overflow: hidden;
    background: var(--bg-light);
}

/* --- Split Screen Layout --- */

/* Left Side: Image Visual */
.login-visual-side {
    flex: 1.3;
    position: relative;
    background: url('/images/admin_bg.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-visual-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.85), rgba(16, 185, 129, 0.6));
    z-index: 1;
}

/* Decorative background elements */
.login-visual-side::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    top: -25%;
    left: -25%;
    z-index: 2;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.visual-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 4rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 2rem;
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.visual-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 2.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, 0.1),
        0 0 0 20px rgba(255, 255, 255, 0.05),
        0 20px 40px rgba(0, 0, 0, 0.3);
    animation: floatingLogo 4s ease-in-out infinite;
    transition: all 0.5s ease;
}

.visual-logo:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow:
        0 0 0 15px rgba(255, 255, 255, 0.15),
        0 0 40px var(--primary);
}

@keyframes floatingLogo {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.visual-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.visual-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.visual-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* Right Side: Form Area */
.login-form-side {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    position: relative;
    background-image:
        radial-gradient(var(--primary-glow) 1px, transparent 1px),
        radial-gradient(var(--primary-glow) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

.form-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInRight 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-header {
    margin-bottom: 3.5rem;
    text-align: center;
    /* Centered as requested */
}

.form-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-header p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.5;
}

.form-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.form-input {
    width: 100%;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--primary-glow);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #94a3b8;
    transition: all 0.3s;
    pointer-events: none;
}

.form-input:focus+.input-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-login:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login i {
    transition: transform 0.3s;
}

.btn-login:hover i {
    transform: translateX(5px);
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-left: 5px solid #ef4444;
    padding: 1.2rem;
    border-radius: 15px;
    color: #b91c1c;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 3.5rem;
    background: #f1f5f9;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e2e8f0;
}

.back-link:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-10px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
}

.back-link i {
    transition: transform 0.3s;
}

.back-link:hover i {
    transform: translateX(-5px);
}

.footer-text {
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* =========================================================
   CONSOLIDATED ADMIN LOGIN MOBILE STYLES (Max-Width: 991px)
   ========================================================= */
@media only screen and (max-width: 991px) {
    body {
        height: auto !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: url('/images/admin_bg.webp') center/cover no-repeat fixed !important;
        overflow-y: auto !important;
    }

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(15, 23, 42, 0.8)) !important;
        z-index: 1;
    }

    .login-visual-side {
        display: none !important;
    }

    .login-form-side {
        position: relative !important;
        z-index: 10 !important;
        background: transparent !important;
        width: 100% !important;
        padding: 40px 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .form-container {
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 40px !important;
        padding: 45px 30px !important;
        width: 100% !important;
        max-width: 450px !important;
        box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4) !important;
        animation: fadeInUp 0.8s ease-out !important;
    }

    .form-header h2 {
        font-size: 2.4rem !important;
        color: white !important;
        -webkit-text-fill-color: white !important;
        margin-bottom: 15px !important;
    }

    .form-header p {
        color: rgba(255, 255, 255, 0.7) !important;
        font-size: 1rem !important;
    }

    .form-input {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        height: 60px !important;
        border-radius: 15px !important;
    }

    .form-input::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .form-input:focus {
        background: rgba(255, 255, 255, 0.25) !important;
        border-color: var(--primary) !important;
    }

    .input-icon,
    #togglePassword {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    .btn-login {
        height: 60px !important;
        border-radius: 15px !important;
        box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4) !important;
    }

    .back-link {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        width: 100% !important;
        justify-content: center !important;
        margin-top: 2.5rem !important;
    }

    .footer-text {
        border-top-color: rgba(255, 255, 255, 0.1) !important;
        color: rgba(255, 255, 255, 0.5) !important;
    }
}
