* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #3597d3;
    --primary-dark: #2E7DB5;
    --primary-light: #6BB5E3;
    --accent-blue: #5AABDE;
    --bg-light: #F8FAFB;
    --bg-white: #FFFFFF;
    --text-dark: #1A2332;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --success-green: #10B981;
    --error-red: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    background-image: url('https://plus.unsplash.com/premium_photo-1661962278758-d529030366fb?q=80&w=1528&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: linear-gradient(135deg, #3597d3 0%, #5AABDE 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    display: flex;
    min-height: 500px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-left {
    flex: 0.9;
    background: linear-gradient(135deg, #3597d3 0%, #5AABDE 100%);
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

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

.company-logo {
    width: 120px;
    height: 120px;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.company-logo:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.company-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.company-logo:hover img {
    transform: scale(1.1);
}

.welcome-section {
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.brand-name {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 25px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.welcome-divider {
    width: 50px;
    height: 2px;
    background: #ffffff;
    margin: 0 auto 24px;
    border-radius: 2px;
    animation: dividerGlow 2s ease-in-out infinite alternate;
}

@keyframes dividerGlow {
    from {
        box-shadow:
            0 0 4px rgba(255, 255, 255, 0.9),
            0 0 10px rgba(255, 255, 255, 0.7),
            0 0 20px rgba(255, 255, 255, 0.4);
    }
    to {
        box-shadow:
            0 0 6px rgba(255, 255, 255, 1),
            0 0 16px rgba(255, 255, 255, 0.9),
            0 0 32px rgba(255, 255, 255, 0.6);
    }
}

.welcome-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.welcome-subtitle {
    font-size: 13px;
    font-weight: 300;
    opacity: 0.85;
}

.login-right {
    flex: 1.1;
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-white);
}

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

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    font-size: 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 400;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(74, 159, 216, 0.1);
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: var(--primary-light);
    background: var(--bg-white);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-blue);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-blue);
    background: rgba(74, 159, 216, 0.1);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-blue);
}

.btn-login {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(74, 159, 216, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
    overflow: hidden;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 159, 216, 0.35);
}

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

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: #ffffff;
    animation: btnIconGlow 1.5s ease-in-out infinite alternate;
}

@keyframes btnIconGlow {
    from {
        text-shadow:
            0 0 4px #ffffff,
            0 0 10px #ffffff,
            0 0 20px #ffffff,
            0 0 35px rgba(255, 255, 255, 0.8);
    }
    to {
        text-shadow:
            0 0 6px #ffffff,
            0 0 16px #ffffff,
            0 0 32px #ffffff,
            0 0 55px rgba(255, 255, 255, 0.9);
    }
}

.btn-login:hover:not(:disabled) .btn-icon {
    transform: translateX(4px);
}

.btn-loading .btn-text,
.btn-loading .btn-icon {
    opacity: 0;
}

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

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(74, 159, 216, 0.2);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-text {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.show-loading {
    display: flex !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
        border-radius: 16px;
    }

    .login-left {
        padding: 32px 28px;
    }

    .login-right {
        padding: 32px 28px;
    }

    .brand-name {
        font-size: 30px;
    }

    .form-title {
        font-size: 24px;
    }

    .company-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .company-logo img {
        width: 75px;
        height: 75px;
    }

    .welcome-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-left {
        padding: 28px 24px;
    }

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

    .company-logo {
        width: 90px;
        height: 90px;
    }

    .company-logo img {
        width: 65px;
        height: 65px;
    }

    .brand-name {
        font-size: 26px;
    }

    .form-title {
        font-size: 22px;
    }
}

/* Animation delays for staggered entrance */
.login-left > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.login-left > *:nth-child(1) { animation-delay: 0.3s; }
.login-left > *:nth-child(2) { animation-delay: 0.4s; }

.login-right > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.login-right > *:nth-child(1) { animation-delay: 0.5s; }
.login-right > *:nth-child(2) { animation-delay: 0.6s; }

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