/* ==========================================
   NOVATECS AGENTS — Login Page
   ========================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* === SPLIT LAYOUT === */
.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* === LEFT PANEL === */
.left-panel {
    width: 45%;
    background: linear-gradient(-45deg, #001028, #003DA5, #001a40, #002855);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle canvas */
.left-panel canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* Left content */
.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 480px;
    animation: fadeInUp 1s ease-out;
}

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

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

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

/* Novatecs logo — white circle container */
.novatecs-logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0,102,204,0.4), 0 0 0 6px rgba(255,255,255,0.08);
    animation: floatLogo 5s ease-in-out infinite;
}
.novatecs-logo-img {
    width: 104px;
    height: 104px;
    object-fit: contain;
}
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* CEMEX logo — white container */
.cemex-logo-wrapper {
    background: white;
    padding: 14px 30px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}
.cemex-logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.logo-brand {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 6px;
    color: #FFFFFF;
    line-height: 1;
    margin-top: 8px;
}

.logo-sub {
    font-size: 10px;
    letter-spacing: 5px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 600;
}

.logo-divider {
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.25);
    margin: 32px auto;
}

/* CEMEX badge */
.cemex-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 24px 40px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 1.2s ease-out 0.3s both;
    transition: all 0.3s ease;
}
.cemex-badge:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.cemex-logo-svg {
    width: 100px;
    height: 35px;
    margin-bottom: 8px;
}

.cemex-text {
    font-size: 32px;
    font-weight: 900;
    color: white;
    letter-spacing: 4px;
    display: none;
}

.cemex-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.left-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-top: 8px;
}

/* Left footer */
.left-footer {
    position: absolute;
    bottom: 28px;
    left: 0; right: 0;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    z-index: 2;
}
.left-footer strong {
    color: rgba(255,255,255,0.4);
}


/* === RIGHT PANEL === */
.right-panel {
    width: 55%;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 48px 48px 6%;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Form header */
.form-title {
    font-size: 28px;
    font-weight: 800;
    color: #0A1628;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: #94A3B8;
    margin-bottom: 32px;
}

/* Microsoft button */
.btn-microsoft {
    width: 100%;
    padding: 13px 20px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-microsoft:hover {
    border-color: #003DA5;
    background: #F0F4FF;
    box-shadow: 0 2px 12px rgba(0,61,165,0.08);
}

.btn-microsoft svg {
    width: 20px;
    height: 20px;
}

/* Separator */
.separator {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #CBD5E1;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.separator span {
    padding: 0 16px;
}

/* Input groups */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: #F8FAFC;
    color: #1A1A2E;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #003DA5;
    box-shadow: 0 0 0 3px rgba(0,61,165,0.08);
    background: #FFFFFF;
}

.input-group input::placeholder {
    color: #94A3B8;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px;
}
.toggle-password:hover { color: #003DA5; }
.toggle-password svg { width: 18px; height: 18px; }

/* Submit button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: #003DA5;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(0,61,165,0.2);
}

.btn-login:hover {
    background: #0052CC;
    box-shadow: 0 6px 20px rgba(0,61,165,0.3);
    transform: translateY(-1px);
}

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

/* Loading state */
.btn-login.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Terms & Conditions button */
.btn-terms {
    width: 100%;
    margin-top: 18px;
    padding: 11px;
    background: transparent;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.btn-terms:hover {
    border-color: #003DA5;
    color: #003DA5;
    background: #F0F4FF;
}

/* Error message */
.error-msg {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 16px;
    color: #DC2626;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
}
.error-msg.show { display: flex; }

/* Right footer */
.right-footer {
    position: absolute;
    bottom: 28px;
    font-size: 11px;
    color: #CBD5E1;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    body { height: auto; overflow: auto; }
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    /* Left panel becomes a compact header */
    .left-panel {
        width: 100%;
        height: auto;
        min-height: 260px;
        padding: 32px 24px 28px;
    }
    .left-content { max-width: 100%; }
    .novatecs-logo-wrapper {
        width: 76px;
        height: 76px;
        margin: 0 auto 12px;
    }
    .novatecs-logo-img {
        width: 64px;
        height: 64px;
    }
    .logo-brand {
        font-size: 20px;
        letter-spacing: 4px;
    }
    .logo-sub {
        font-size: 9px;
        letter-spacing: 3px;
    }
    .logo-divider { margin: 16px auto; }
    .cemex-badge {
        display: block;
        padding: 12px 24px;
        margin-bottom: 14px;
    }
    .cemex-logo-wrapper {
        padding: 8px 18px;
        margin-bottom: 6px;
    }
    .cemex-logo-img { height: 26px; }
    .cemex-sub { font-size: 10px; }
    .left-desc {
        display: block;
        font-size: 13px;
        padding: 0 12px;
    }
    .left-footer { display: none; }

    /* Right panel — centered form, no left bias on mobile */
    .right-panel {
        width: 100%;
        flex: 1;
        align-items: center;
        padding: 32px 24px 40px;
    }
    .login-form-wrapper { max-width: 360px; }
    .form-title { font-size: 22px; }
    .form-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }
    .btn-microsoft {
        padding: 12px 18px;
        font-size: 13px;
    }
    .separator { margin: 18px 0; }
    .input-group input {
        padding: 12px 14px 12px 42px;
        font-size: 14px;
    }
    .btn-login {
        padding: 13px;
        font-size: 14px;
    }
    .btn-terms {
        padding: 10px;
        font-size: 12px;
        margin-top: 14px;
    }
    .right-footer {
        position: static;
        margin-top: 20px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .left-panel {
        min-height: 240px;
        padding: 24px 18px 22px;
    }
    .novatecs-logo-wrapper { width: 68px; height: 68px; }
    .novatecs-logo-img { width: 56px; height: 56px; }
    .logo-brand { font-size: 18px; letter-spacing: 3px; }
    .logo-divider { margin: 12px auto; }
    .cemex-badge { padding: 10px 18px; }
    .cemex-logo-img { height: 22px; }
    .left-desc { font-size: 12px; }
    .right-panel { padding: 24px 20px 32px; }
    .form-title { font-size: 20px; }
}
