* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: #f0f2f5;
    overflow: hidden;
}

/* ===== Split Layout ===== */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ===== Left Panel - Animated Branding ===== */
.login-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2), var(--primary-color, #667eea));
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    color: white;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated floating particles */
.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -150px;
    right: -100px;
    animation: pulse-glow 8s ease-in-out infinite;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    bottom: -80px;
    left: -60px;
    animation: pulse-glow 10s ease-in-out infinite 2s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.brand-icon-circle {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.25);
    overflow: hidden;
    animation: float-logo 4s ease-in-out infinite;
}

@keyframes float-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.brand-icon-circle i {
    font-size: 42px;
    color: white;
}

.brand-icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* ===== Feature Slider ===== */
.feature-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.feature-slides-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.feature-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    text-align: center;
}

.feature-slide-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.12);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    transition: transform 0.3s, background 0.3s;
}

.feature-slide.active .feature-slide-icon {
    animation: icon-pop 0.6s ease-out;
}

@keyframes icon-pop {
    0% { transform: scale(0.6) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.feature-slide-icon i {
    font-size: 34px;
    color: white;
}

.feature-slide-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.feature-slide-desc {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.7;
    max-width: 300px;
}

/* Dots navigation */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all 0.35s ease;
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

/* Old brand-features hidden */
.brand-features {
    display: none;
}

/* Floating shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    animation: drift 20s infinite linear;
    z-index: 1;
}

.shape-1 { width: 80px; height: 80px; top: 15%; left: 10%; animation-duration: 18s; }
.shape-2 { width: 50px; height: 50px; top: 60%; right: 15%; animation-duration: 22s; animation-delay: 3s; }
.shape-3 { width: 120px; height: 120px; bottom: 20%; left: 30%; animation-duration: 25s; animation-delay: 6s; }
.shape-4 { width: 35px; height: 35px; top: 35%; right: 25%; animation-duration: 15s; animation-delay: 2s; }

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(90deg); }
    50% { transform: translate(-10px, -35px) rotate(180deg); }
    75% { transform: translate(20px, -15px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ===== Right Panel - Form ===== */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8f9fb;
    position: relative;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-header {
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 14px;
    color: #8e8e9a;
}

/* Alert */
.alert-error {
    background: #fff5f5;
    color: #e03131;
    border: 1px solid #ffc9c9;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Form Groups */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a5a;
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .field-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #b0b0c0;
    font-size: 16px;
    transition: color 0.3s;
    pointer-events: none;
}

.input-icon-wrapper input:focus ~ .field-icon {
    color: var(--primary-color, #667eea);
}

.form-control {
    width: 100%;
    padding: 13px 44px 13px 44px;
    background: white;
    border: 2px solid #e8eaf0;
    border-radius: 10px;
    font-size: 15px;
    color: #2c3e50;
    transition: all 0.25s ease;
    outline: none;
}

.form-control::placeholder {
    color: #b8bcc8;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color, #667eea);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
}

.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c0cc;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary-color, #667eea);
}

/* Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #b0b0ba;
}

/* ===== Mobile Logo (visible only on mobile) ===== */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 25px;
}

.mobile-logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.mobile-logo-circle i {
    font-size: 32px;
    color: white;
}

.mobile-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
}

.mobile-company-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand-panel {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .brand-features {
        display: none;
    }

    .login-form-panel {
        flex: 1;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .mobile-logo-circle {
        width: 70px;
        height: 70px;
    }

    .mobile-logo-circle i {
        font-size: 28px;
    }

    .mobile-company-name {
        font-size: 16px;
    }

    .login-form-container {
        max-width: 100%;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .form-control {
        font-size: 16px; /* prevent iOS zoom */
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .login-brand-panel {
        display: none;
    }

    .mobile-logo {
        display: block;
        margin-bottom: 15px;
    }

    .mobile-logo-circle {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }

    .mobile-logo-circle i {
        font-size: 22px;
    }
    
    .login-form-panel {
        padding: 20px;
    }
}
