﻿/* ========================================
   CARGO ONE LOGISTICS - LIGHT THEME LOGIN
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 50%, #f0f4f9 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Subtle Background Animation */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatReverse 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
}

@keyframes floatReverse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 30px) scale(1.05); }
}

/* Main Container */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

/* Main Card */
.login-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    display: flex;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 500px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Section */
.login-left {
    flex: 1;
    padding: 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo & Branding */
.brand-section {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
    animation: pulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: shine 3s ease infinite;
}

.logo-icon i {
    position: relative;
    z-index: 1;
}

@keyframes shine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, 15px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5); }
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 900;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.8px;
}

.brand-text p {
    font-size: 10px;
    color: #6b7280;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

/* Welcome Text */
.welcome-section {
    margin-bottom: 35px;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -1px;
}

.welcome-section p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    font-weight: 500;
}

/* Form Group */
.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.form-group input {
    width: 100%;
    padding: 16px 18px 16px 50px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-group input::placeholder {
    color: transparent;
}

.form-group input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), inset 0 0 15px rgba(99, 102, 241, 0.03);
    transform: translateY(-2px);
}

.form-group input:focus ~ .form-icon {
    color: #6366f1;
    transform: translateY(-50%) scale(1.2);
}

.form-group input:hover:not(:focus) {
    border-color: #d1d5db;
    background: #ffffff;
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 50px;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 14px;
    font-size: 12px;
    font-weight: 800;
    color: #6366f1;
    background: #ffffff;
    padding: 0 6px;
    border-radius: 4px;
}

/* Remember & Forgot */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
    gap: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    transition: all 0.3s;
}

.remember-me:hover {
    color: #1f2937;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
    border-radius: 5px;
    transition: all 0.2s;
}

.remember-me input[type="checkbox"]:hover {
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}

.forgot-password {
    color: #6366f1;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s;
    position: relative;
}

.forgot-password:hover {
    color: #4f46e5;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    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.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover:not(:disabled)::before {
    left: 100%;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.45);
}

.btn-login:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-login .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Right Section */
.login-right {
    flex: 1;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite;
}

.login-right::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: floatReverse 30s ease-in-out infinite;
}

.right-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    text-align: center;
    animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.logo-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    animation: logoContainerFloat 3s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

@keyframes logoContainerFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.large-logo {
    width: 220px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    color: #6366f1;
    animation: logoBounce 3s ease-in-out infinite;
    overflow: hidden;
}

.large-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.1));
    transition: all 0.3s ease;
}

.logo-container:hover .large-logo img {
    filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.2));
    transform: scale(1.05);
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.right-title {
    color: #ffffff;
    font-size: 26px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.right-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    max-width: 280px;
}

.login-right img {
    width: 90%;
    max-height: 500px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Error Message */
.error-message {
    padding: 14px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.error-message.show {
    display: flex;
}

.error-message i {
    flex-shrink: 0;
    font-size: 15px;
    animation: shake 0.4s ease;
}

/* Success Message */
.success-message {
    padding: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.06) 100%);
    border: 1.5px solid #86efac;
    border-radius: 12px;
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.success-message.show {
    display: flex;
}

.success-message i {
    flex-shrink: 0;
    font-size: 15px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .login-card {
        min-height: auto;
    }
    .login-left {
        padding: 40px 35px;
    }
    .welcome-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        min-height: auto;
    }
    .login-left {
        padding: 35px;
    }
    .login-right {
        display: none;
    }
    .welcome-section h2 {
        font-size: 24px;
    }
    .brand-section {
        margin-bottom: 25px;
    }
}
