:root {
    --sky-primary: #a01b44;
    --sky-secondary: #821436;
    --sky-gradient: linear-gradient(135deg, var(--sky-primary) 0%, var(--sky-secondary) 100%);
    --sky-primary-light: rgba(160, 27, 68, 0.1);
    --sky-bg: #ffffff;
    --sky-text: #1a1a1a;
    --sky-text-light: #6b7280;
    --sky-accent-bg: #111827;
    --sky-border: rgba(160, 27, 68, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --sky-bg: #0f172a;
    --sky-text: #f1f5f9;
    --sky-text-light: #94a3b8;
    --sky-accent-bg: #020617;
    --sky-border: rgba(160, 27, 68, 0.3);
}

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

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Prevent all scrolling */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--sky-bg);
    color: var(--sky-text);
}

.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
    border-radius: 0; /* Full screen no round corners */
}

/* Left Section: Form Area Enhancements */
.login-left {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    position: relative;
    background-color: var(--sky-bg);
    z-index: 10;
    transition: var(--transition);
    /* Subtle industrial/data grid pattern */
    background-image: 
        linear-gradient(rgba(160, 27, 68, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(160, 27, 68, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

body.dark-mode .login-left {
    background-image: 
        linear-gradient(rgba(160, 27, 68, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(160, 27, 68, 0.07) 1px, transparent 1px);
}

/* Decorative background shapes for 'Smart' feel */
.login-left::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(160, 27, 68, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.login-form-container {
    width: 100%;
    max-width: 540px;
    margin: auto 0;
    text-align: center;
    z-index: 10;
    padding: 20px;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition);
}

body.dark-mode .login-form-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

.login-logo {
    width: 210px;
    margin: 0 auto 20px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
    animation: logo-breathe 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.06) rotate(2deg);
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.95)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

@keyframes logo-breathe {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.75)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15)); 
    }
    50% { 
        transform: scale(1.04); 
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.95)) drop-shadow(0 6px 15px rgba(0, 0, 0, 0.2)); 
    }
}

.login-form-container h2 {
    font-size: 2.5rem; /* Even larger */
    font-weight: 900; /* Super bold */
    color: var(--sky-text);
    margin-bottom: 10px;
    letter-spacing: -1.5px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    background: linear-gradient(135deg, var(--sky-text) 0%, var(--sky-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form-container p {
    color: var(--sky-text-light);
    margin-bottom: 30px; /* Reduced margin */
    font-size: 1rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.form-group:nth-child(2) { animation-delay: 0.5s; }
.form-group:nth-child(3) { animation-delay: 0.6s; }

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 14px; /* Increased from 0.875rem */
    color: var(--sky-text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.input-container i {
    position: absolute;
    left: 20px;
    color: var(--sky-text-light);
    font-size: 20px; /* Increased */
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(248, 250, 252, 0.8);
    color: var(--sky-text);
    height: 56px;
}

body.dark-mode .form-control {
    background-color: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--sky-primary);
    box-shadow: 0 0 0 5px rgba(160, 27, 68, 0.1), 0 10px 20px -5px rgba(160, 27, 68, 0.2);
    background-color: #fff;
    transform: scale(1.02); /* Slight scale up */
}

.form-control:focus + i, 
.input-container:focus-within i {
    color: var(--sky-primary);
}

.btn-signin {
    width: 100%;
    padding: 16px;
    background: var(--sky-gradient) !important;
    color: #fff !important;
    border: none;
    border-radius: 20px;
    font-size: 1.2rem; /* Larger */
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.7s both, pulse-glow 3s infinite;
    box-shadow: 0 15px 35px -5px var(--sky-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 15px 35px -5px var(--sky-primary-light); }
    50% { box-shadow: 0 15px 45px 5px var(--sky-primary-light); }
    100% { box-shadow: 0 15px 35px -5px var(--sky-primary-light); }
}

.btn-signin::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: 2; /* Shine on top */
    pointer-events: none;
}

.btn-signin:hover {
    background-color: var(--sky-primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(160, 27, 68, 0.5);
}

.btn-signin:hover::after {
    left: 100%;
}

.login-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--sky-text-light);
    z-index: 20;
    animation: fadeIn 1.5s ease-out;
}

/* Background Animation Elements */
.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.bg-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(160, 27, 68, 0.15) 0%, transparent 70%); /* Increased opacity */
    border-radius: 50%;
    animation: float 20s infinite linear;
    z-index: 1;
}

.p1 { width: 300px; height: 300px; top: -100px; left: -100px; animation-duration: 25s; }
.p2 { width: 400px; height: 400px; bottom: -150px; right: -100px; animation-duration: 30s; animation-delay: -5s; }
.p3 { width: 200px; height: 200px; top: 20%; right: 10%; animation-duration: 20s; animation-delay: -10s; }
.p4 { width: 150px; height: 150px; bottom: 30%; left: 15%; animation-duration: 18s; animation-delay: -15s; }

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, 50px) rotate(120deg) scale(1.1); }
    66% { transform: translate(-20px, 20px) rotate(240deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-footer a {
    color: var(--sky-primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Right Section: Visual & Slider */
.login-right {
    flex: 0 0 55%;
    background-color: var(--sky-accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background,
.video-background-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-background {
    filter: brightness(0.4) contrast(1.1);
}

.video-background-fallback {
    background-image: url('../img/login/smart_garment_factory_bg.png');
    background-size: cover;
    background-position: center;
    z-index: 0; /* Behind video */
    animation: kenBurns 40s infinite alternate linear;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(17, 24, 39, 0.8) 100%);
    z-index: 2;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}

.capabilities-slider {
    width: 100%;
    max-width: 600px;
    height: 400px;
    position: relative;
    z-index: 2;
}

.capability-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.capability-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.capability-slide:not(.active) {
    transform: translateY(15px);
}

.capability-icon {
    font-size: 5rem;
    transform: translateY(20px);
}

.capability-icon i {
    font-size: 3rem;
    color: var(--sky-primary);
    text-shadow: 0 0 20px rgba(160, 27, 68, 0.4); /* Premium glow */
    margin-bottom: 25px;
}

.capability-title {
    font-size: 2.8rem; /* Cinematic size */
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.capability-desc {
    font-size: 1.25rem; /* Larger */
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.slider-dots {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--sky-primary);
    width: 24px;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .login-left {
        padding: 40px 60px;
    }
    .login-right {
        padding: 40px;
    }
}

@media (max-width: 900px) {
    .login-right {
        display: none;
    }
    .login-left {
        flex: 0 0 100%;
        padding: 40px;
    }
    .login-logo {
        left: 40px;
    }
    .login-footer {
        left: 40px;
        right: 40px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 30px 24px;
    }
    .login-logo {
        top: 30px;
        left: 24px;
        width: 120px;
    }
    .login-form-container h2 {
        font-size: 1.875rem;
    }
    .login-footer {
        bottom: 30px;
        left: 24px;
        right: 24px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

