/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* GEP Brand Colors */
    --magna-green: #00B140;
    --premium-red: #E4032E;
    --diesel-blue: #003DA5;

    /* Neutral Colors */
    --dark-bg: #f0f4f8;
    --darker-bg: #e1e8ed;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;

    /* Accent Colors */
    --accent-gradient: linear-gradient(135deg, var(--magna-green), var(--premium-red), var(--diesel-blue));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3748 25%, #1a2332 50%, #2d3748 75%, #1a1f3a 100%);
}

.drop {
    position: absolute;
    border-radius: 50% 0 50% 50%;
    opacity: 0.35;
    transform: rotate(-45deg);
}

.drop-magna {
    background: radial-gradient(circle at 30% 30%, #00B140, #008230);
    width: 120px;
    height: 120px;
    top: -150px;
    left: 10%;
    animation: fall 8s infinite ease-in;
    animation-delay: 0s;
}

.drop-premium {
    background: radial-gradient(circle at 30% 30%, #E4032E, #b8021e);
    width: 90px;
    height: 90px;
    top: -150px;
    right: 15%;
    animation: fall 10s infinite ease-in;
    animation-delay: 2s;
}

.drop-diesel {
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000000);
    width: 110px;
    height: 110px;
    top: -150px;
    left: 50%;
    animation: fall 9s infinite ease-in;
    animation-delay: 4s;
}

.drop:nth-child(4) {
    background: radial-gradient(circle at 30% 30%, #E4032E, #b8021e);
    top: -150px;
    right: 25%;
    width: 80px;
    height: 80px;
    animation: fall 11s infinite ease-in;
    animation-delay: 1s;
}

.drop:nth-child(5) {
    background: radial-gradient(circle at 30% 30%, #00B140, #008230);
    top: -150px;
    left: 30%;
    width: 95px;
    height: 95px;
    animation: fall 12s infinite ease-in;
    animation-delay: 5s;
}

.drop:nth-child(6) {
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000000);
    top: -150px;
    right: 40%;
    width: 75px;
    height: 75px;
    animation: fall 10.5s infinite ease-in;
    animation-delay: 3s;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.35;
    }
    90% {
        opacity: 0.35;
    }
    100% {
        transform: translateY(calc(100vh + 150px)) rotate(-45deg);
        opacity: 0;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 95%;
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.6s ease;
}

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

/* Left Side - Branding */
.login-left {
    background: linear-gradient(135deg, #0A0E27 0%, #1a1f3a 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 177, 64, 0.15) 0%, transparent 70%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.brand-content {
    position: relative;
    z-index: 1;
}

.logo-container {
    margin-bottom: 40px;
}

.logo-drops {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.logo-drop {
    width: 70px;
    height: 70px;
    border-radius: 50% 0 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    transform: rotate(-45deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: dropBounce 2s infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.logo-drop span {
    transform: rotate(45deg);
    display: inline-block;
}

.logo-drop.magna {
    background: linear-gradient(135deg, #00B140, #008230);
    animation-delay: 0s;
}

.logo-drop.premium {
    background: linear-gradient(135deg, #E4032E, #b8021e);
    animation-delay: 0.2s;
}

.logo-drop.diesel {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    animation-delay: 0.4s;
}

@keyframes dropBounce {
    0%, 100% {
        transform: rotate(-45deg) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: rotate(-45deg) scale(1.1);
        filter: brightness(1.3);
    }
}

.login-left h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tagline {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    margin-bottom: 50px;
    font-weight: 400;
}

.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    color: white;
    font-size: 36px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 400;
}

/* Right Side - Login Form */
.login-right {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.form-header {
    margin-bottom: 40px;
}

.form-header h2 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: #1a1a2e;
    background: #ffffff;
    transition: all var(--transition-normal);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--magna-green);
    box-shadow: 0 0 0 4px rgba(0, 177, 64, 0.1);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:not(:placeholder-shown) ~ .input-icon {
    color: var(--magna-green);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.error-message {
    color: var(--premium-red);
    font-size: 13px;
    font-weight: 400;
    display: none;
}

.error-message.show {
    display: block;
}

.form-group.error input {
    border-color: var(--premium-red);
}

.form-group.error .input-icon {
    color: var(--premium-red);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
    position: relative;
    padding-left: 28px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.checkbox-container:hover .checkmark {
    border-color: var(--magna-green);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--magna-green);
    border-color: var(--magna-green);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.forgot-password {
    color: var(--magna-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: #008230;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, var(--magna-green) 0%, #008230 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 177, 64, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 177, 64, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-login.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form Footer */
.form-footer {
    margin-top: 32px;
    text-align: center;
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-footer a {
    color: var(--magna-green);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.form-footer a:hover {
    color: #008230;
}

.copyright {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 16px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 50px 40px;
    }
}

@media (max-width: 640px) {
    .login-container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-right {
        padding: 40px 24px;
    }

    .form-header h2 {
        font-size: 28px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 400px) {
    .logo-drop {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .login-left h1 {
        font-size: 26px;
    }

    .stat-number {
        font-size: 28px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .background-animation,
    .login-left,
    .form-footer {
        display: none;
    }
}
