@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;&display=swap');

:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --accent: #6610f2;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #2d3436;
    --text-muted: #636e72;
}

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background: #0f0c29;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    position: relative;
}

/* Animated Background Shapes */
.bg-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: move 20s infinite alternate;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: #00d2ff;
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 350px;
    height: 350px;
    background: #9d50bb;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    background: #f12711;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
    animation-duration: 25s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}

.login-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.login-card {
    flex: 1;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-card {
    flex: 1;
    max-width: 420px;
    color: white;
    padding: 40px;
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.info-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #00d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-card .badge-erp {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.info-card .plan-pill {
    margin-left: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 700;
}

.info-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.feature-list {
    list-style: none;
    margin-bottom: 40px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.feature-list li i {
    color: #00d2ff;
}

.btn-commercial {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    color: #302b63;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-commercial:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: #00d2ff;
    color: white;
}

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

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.brand-icon:hover {
    transform: rotate(5deg) scale(1.05);
}

.login-header h1 {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Styles */
.form-floating {
    margin-bottom: 20px;
}

.form-control {
    border: 2px solid #edf2f7;
    border-radius: 12px;
    padding: 12px 16px;
    height: 60px;
    font-size: 1rem;
    color: var(--text-main);
    background: white;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    background: white;
}

.form-floating label {
    padding: 1rem 1rem;
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
    padding: 5px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Captcha UI */
.captcha-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.captcha-box:focus-within {
    border-color: var(--primary);
    background: #f0f7ff;
}

.captcha-pregunta {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Remember & Forgot */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg) translate(-100%, -100%);
    transition: transform 0.6s ease;
}

.btn-login:hover:not(:disabled)::after {
    transform: rotate(45deg) translate(100%, 100%);
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 123, 255, 0.4);
    filter: brightness(1.1);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Secondary Links */
.footer-links {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.register-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
}

.register-link:hover {
    text-decoration: underline;
}

.promo-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.promo-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.promo-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    margin-bottom: 25px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-left: 5px solid;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.alert-danger { background: rgba(254, 226, 226, 0.9); color: #991b1b; border-color: #ef4444; }
.alert-success { background: rgba(220, 252, 231, 0.9); color: #166534; border-color: #22c55e; }
.alert-warning { background: rgba(254, 249, 195, 0.9); color: #854d0e; border-color: #eab308; }

/* Responsiveness */
@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 10px 0;
    }

    .login-container {
        flex-direction: column-reverse;
        max-width: 500px;
        gap: 0;
        padding: 10px;
    }
    
    .info-card {
        text-align: center;
        padding: 20px 15px;
    }
    
    .info-card h2 {
        font-size: 1.8rem;
    }

    .info-card p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .feature-list {
        display: none;
    }

    .btn-commercial {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 25px 18px;
        border-radius: 18px;
    }
    
    .login-header {
        margin-bottom: 20px;
    }

    .login-header h1 {
        font-size: 1.35rem;
    }

    .brand-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .brand-icon img {
        height: 36px !important;
    }

    .form-control {
        height: 52px;
        font-size: 0.9rem;
    }

    .captcha-box {
        padding: 14px;
        margin-bottom: 15px;
    }

    .btn-login {
        padding: 13px;
        font-size: 0.95rem;
    }

    .remember-forgot {
        margin-bottom: 20px;
        font-size: 0.82rem;
    }

    .footer-links {
        margin-top: 20px;
    }

    .promo-section {
        margin-top: 25px;
        padding-top: 15px;
    }

    .info-card {
        padding: 15px 10px;
    }

    .info-card h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .info-card p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
}
