:root {
    --primary-green: #28a745;
    --primary-green-dark: #1e7e34;
    --primary-green-light: #34ce57;
    --success-green: #28a745;
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #28a745;
    --emerald-600: #1e7e34;
    --emerald-700: #155724;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Hero Section */
.hero-section {
    flex: 1;
    background-image: linear-gradient(135deg, rgba(40, 167, 69, 0.85) 0%, rgba(30, 126, 52, 0.9) 100%), url('../../assets/images/novaliches.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.85) 0%, rgba(30, 126, 52, 0.9) 100%);
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 3;
    position: relative;
    max-width: 500px;
    padding: 2rem;
    animation: slideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-logo {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-logo img {
    width: 100px;
    height: auto;
    transition: all 0.3s ease;
}

.hero-logo:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.hero-logo:hover img {
    transform: scale(1.1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
    text-align: center;
    min-width: 120px;
}

.hero-feature i {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-feature:hover i {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.hero-feature span {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Right Side - Form Section */
.form-section {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    z-index: 1;
}

.form-container {
    width: 100%;
    max-width: 440px;
    z-index: 2;
    position: relative;
    animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--white);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: var(--gray-700);
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
    transform: translateY(-1px);
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success-green);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.form-control:focus + .input-icon {
    color: var(--primary-green);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-green-dark);
}

.btn-login {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.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.6s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-green-light), var(--primary-green));
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.signup-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-100);
}

.signup-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.signup-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: var(--primary-green-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .form-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .hero-section {
        min-height: 40vh;
        flex: none;
    }

    .hero-content {
        max-width: 100%;
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .form-section {
        flex: none;
        min-height: 60vh;
        padding: 1.5rem;
    }

    .form-container {
        max-width: 100%;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 35vh;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }

    .hero-logo img {
        width: 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .form-control {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }

    .btn-login {
        padding: 0.875rem 1.5rem;
    }
}

/* Custom SweetAlert2 styling */
.swal2-popup {
    border-radius: 16px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-title {
    font-weight: 600 !important;
    color: var(--gray-900) !important;
}

.swal2-confirm {
    background: var(--primary-green) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.form-control:focus-visible,
.btn-login:focus-visible,
.forgot-link:focus-visible,
.signup-link:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.password-toggle {
    position: absolute;
    right: 45px; /* Adjust based on your input-icon positioning */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle:focus {
    outline: none;
    color: #28a745;
}

.input-wrapper .input-icon {
    right: 70px;
}