/* Construction Login Page - Version 1 */
/* Theme: Blue & Light Gray with Construction Elements */

:root {
    --primary-blue: #4A90E2;
    --dark-blue: #2E5C8A;
    --light-blue: #E8F4FD;
    --accent-orange: #FF9500;
    --gray-light: #F5F7FA;
    --gray-medium: #8B95A5;
    --gray-dark: #2C3E50;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    display: flex;
    width: 95%;
    max-width: 1200px;
    min-height: 650px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 20px 60px var(--shadow);
    overflow: hidden;
}

/* Left Panel - Illustration */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.pattern-dots {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 20px 20px;
}

.construction-scene {
    position: relative;
    height: 300px;
    margin: 40px 0;
}

/* Crane Animation - Enhanced */
.crane-icon {
    position: absolute;
    top: 20px;
    right: 60px;
    font-size: 48px;
    color: var(--accent-orange);
    animation: craneSwing 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes craneSwing {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    25% { transform: rotate(8deg) translateY(-5px); }
    50% { transform: rotate(-8deg) translateY(0); }
    75% { transform: rotate(8deg) translateY(-5px); }
}

/* Building Construction - Enhanced */
.building-illustration {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 180px;
}

.building-layer {
    position: absolute;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    animation: buildUp 3s ease-out infinite;
}

.layer-1 {
    left: 20px;
    width: 60px;
    height: 100px;
    animation-delay: 0s;
}

.layer-2 {
    left: 70px;
    width: 60px;
    height: 140px;
    animation-delay: 0.5s;
}

.layer-3 {
    left: 120px;
    width: 60px;
    height: 80px;
    animation-delay: 1s;
}

@keyframes buildUp {
    0% {
        height: 0;
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

/* Excavator Animation */
.excavator {
    position: absolute;
    bottom: 50px;
    left: 20px;
    font-size: 32px;
    color: var(--accent-orange);
    animation: excavatorDig 5s ease-in-out infinite;
}

@keyframes excavatorDig {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(10px) rotate(-5deg); }
    50% { transform: translateX(0) rotate(5deg); }
    75% { transform: translateX(-10px) rotate(-5deg); }
}

/* Construction Truck Moving */
.truck-moving {
    position: absolute;
    bottom: 15px;
    left: -50px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
    animation: truckMove 8s linear infinite;
}

@keyframes truckMove {
    0% { left: -50px; }
    100% { left: calc(100% + 50px); }
}

/* Construction Workers */
.worker {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    animation: workerMove 6s ease-in-out infinite;
}

.worker-1 {
    bottom: 80px;
    left: 100px;
    animation-delay: 0s;
}

.worker-2 {
    bottom: 80px;
    right: 120px;
    animation-delay: 3s;
}

@keyframes workerMove {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

/* Road Construction with Roller */
.road-construction {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
}

.road-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-top: 3px dashed rgba(255, 255, 255, 0.3);
    animation: roadBuild 4s ease-in-out infinite;
}

@keyframes roadBuild {
    0% { width: 0%; opacity: 0.5; }
    50% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 1; }
}

.road-roller {
    position: absolute;
    bottom: 5px;
    left: 0;
    font-size: 24px;
    color: var(--accent-orange);
    animation: rollerMove 4s ease-in-out infinite;
}

@keyframes rollerMove {
    0% { left: 0; }
    50% { left: calc(100% - 30px); }
    100% { left: calc(100% - 30px); }
}

.lane-marking {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        rgba(255, 255, 255, 0.4) 0px,
        rgba(255, 255, 255, 0.4) 20px,
        transparent 20px,
        transparent 40px
    );
    animation: markingAppear 4s ease-in-out infinite;
}

@keyframes markingAppear {
    0% { opacity: 0; width: 0%; }
    50% { opacity: 0; width: 0%; }
    100% { opacity: 1; width: 100%; }
}

/* Railway Track Animation */
.railway-track {
    position: absolute;
    bottom: 120px;
    left: 0;
    right: 0;
    height: 30px;
}

.track-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.track-line::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.track-sleepers {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
}

.track-sleepers span {
    width: 3px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    animation: sleeperBuild 0.5s ease-out;
}

.track-sleepers span:nth-child(1) { animation-delay: 0s; }
.track-sleepers span:nth-child(2) { animation-delay: 0.1s; }
.track-sleepers span:nth-child(3) { animation-delay: 0.2s; }
.track-sleepers span:nth-child(4) { animation-delay: 0.3s; }
.track-sleepers span:nth-child(5) { animation-delay: 0.4s; }

@keyframes sleeperBuild {
    from { height: 0; opacity: 0; }
    to { height: 20px; opacity: 1; }
}

.train-icon {
    position: absolute;
    bottom: 5px;
    left: -40px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
    animation: trainMove 10s linear infinite;
}

@keyframes trainMove {
    0% { left: -40px; }
    100% { left: calc(100% + 40px); }
}

/* Bridge Construction Progress */
.bridge-construction {
    position: absolute;
    bottom: 160px;
    left: 30px;
    width: 150px;
    height: 60px;
}

.bridge-icon {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 36px;
    color: rgba(255, 255, 255, 0.6);
    animation: bridgePulse 3s ease-in-out infinite;
}

@keyframes bridgePulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.bridge-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    display: flex;
    gap: 4px;
}

.bridge-segment {
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    animation: segmentBuild 1s ease-out;
}

.seg-1 { animation-delay: 0s; }
.seg-2 { animation-delay: 0.3s; }
.seg-3 { animation-delay: 0.6s; }

@keyframes segmentBuild {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}

/* Drainage System */
.drainage-system {
    position: absolute;
    bottom: 200px;
    right: 50px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.5);
    animation: waterFlow 3s ease-in-out infinite;
}

@keyframes waterFlow {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(10px); opacity: 0.8; }
}

/* Floating Construction Icons */
.floating-icon {
    position: absolute;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    animation: floatAround 4s ease-in-out infinite;
}

.float-1 {
    top: 60px;
    left: 80px;
    animation-delay: 0s;
}

.float-2 {
    top: 140px;
    right: 100px;
    animation-delay: 1.5s;
}

.float-3 {
    top: 220px;
    left: 150px;
    animation-delay: 3s;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(0, -20px) rotate(0deg); }
    75% { transform: translate(-10px, -10px) rotate(-5deg); }
}

.info-text {
    color: var(--white);
    z-index: 1;
}

.info-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.info-text p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Right Panel - Login Form */
.right-panel {
    flex: 1;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: var(--gray-medium);
    font-weight: 500;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 14px 48px 14px 16px; /* Right padding for toggle button, normal left padding */
    font-size: 15px;
    border: 2px solid #E1E8ED;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

/* User ID field doesn't need right padding */
#userId {
    padding: 14px 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px var(--light-blue);
    transform: translateY(-2px);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

.error-message {
    display: block;
    font-size: 13px;
    color: #E74C3C;
    margin-top: 6px;
    min-height: 18px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-dark);
}

.remember-me input {
    margin-right: 8px;
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-blue);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(74, 144, 226, 0.5);
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
}

.btn-login i {
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(5px);
    animation: arrowSlide 0.6s ease infinite;
}

@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

.btn-spinner {
    margin-left: 8px;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: #FDECEA;
    color: #C0392B;
    border: 1px solid #F5B7B1;
}

.signup-link {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--gray-medium);
}

.signup-link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: var(--dark-blue);
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .left-panel {
        padding: 40px;
        min-height: 300px;
    }

    .construction-scene {
        height: 200px;
    }

    .info-text h2 {
        font-size: 24px;
    }

    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    /* Hide the entire left panel with animations on mobile */
    .left-panel {
        display: none;
    }
    
    .login-container {
        max-width: 100%;
    }
    
    .right-panel {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .left-panel {
        display: none;
    }
    
    .right-panel {
        padding: 30px 20px;
    }
    
    .login-card {
        max-width: 100%;
    }
    
    .logo-section i {
        font-size: 40px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}
