* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #272727 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Fondo de imagen con overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="800" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Elementos decorativos de fondo */
.background-shape-1 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(0, 138, 207, 0.08);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

.background-shape-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(0, 138, 207, 0.08);
    border-radius: 50%;
    bottom: -80px;
    right: -50px;
    animation: float 8s ease-in-out infinite reverse;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 15, 15, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 138, 207, 0.1);
    backdrop-filter: blur(10px);
}

/* Sección izquierda - Welcome */
.welcome-section {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 138, 207, 0.15) 0%, rgba(0, 138, 207, 0.08) 100%);
    padding: 60px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(0, 138, 207, 0.2);
}

.welcome-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 138, 207, 0.1) 0%, rgba(0, 138, 207, 0) 70%);
    border-radius: 50%;
    bottom: -50px;
    right: -50px;
}

.welcome-section img {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
    display: block;
}

.welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.welcome-section h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    color: #008ACF;
}

.welcome-section .subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 30px;
    font-weight: 600;
    color: #008ACF;
}

.welcome-section p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.erp-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
    font-size: 12px;
    padding: 12px;
    background: rgba(0, 138, 207, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 138, 207, 0.2);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(0, 138, 207, 0.15);
    border-color: rgba(0, 138, 207, 0.4);
    transform: translateX(5px);
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: #008ACF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 14px;
}

/* Sección derecha - Login Form */
.login-section {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(20, 20, 40, 0.5);
}

.login-header {
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 32px;
    color: #008ACF;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #b0b0b0;
    font-size: 13px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #008ACF;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid rgba(0, 138, 207, 0.2);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: #008ACF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 138, 207, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #008ACF;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #0066a1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #b0b0b0;
}

.checkbox input {
    cursor: pointer;
    accent-color: #008ACF;
}

.forgot-password {
    background: none;
    border: none;
    color: #008ACF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    cursor: pointer;
    font-size: 12px;
}

.forgot-password:hover {
    color: #0066a1;
}

.btn-signin {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #008ACF 0%, #00a3e8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 138, 207, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-signin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 138, 207, 0.4);
    background: linear-gradient(135deg, #0079b3 0%, #008ACF 100%);
}

.btn-signin:active:not(:disabled) {
    transform: translateY(0);
}

.btn-signin:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-social {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 138, 207, 0.3);
    background: transparent;
    color: #008ACF;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-social:hover {
    border-color: #008ACF;
    background: rgba(0, 138, 207, 0.1);
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #808080;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.98) 0%, rgba(20, 20, 40, 0.98) 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 138, 207, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(0, 138, 207, 0.2);
    padding-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    color: #008ACF;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #008ACF;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #0066a1;
}

/* Modal Contacto */
.contact-info {
    margin: 30px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 138, 207, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 138, 207, 0.1);
}

.contact-item:hover {
    background: rgba(0, 138, 207, 0.15);
    transform: translateX(5px);
    border-color: rgba(0, 138, 207, 0.3);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #008ACF 0%, #00a3e8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 3px;
}

.contact-details p {
    font-size: 13px;
    color: #b0b0b0;
}

.contact-details a {
    color: #008ACF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: #0066a1;
}

/* Modal Olvidar Contraseña */
.forgot-form-group {
    margin-bottom: 20px;
}

.forgot-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.forgot-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 138, 207, 0.2);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.forgot-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.forgot-form-group input:focus {
    outline: none;
    border-color: #008ACF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 138, 207, 0.1);
}

.modal-description {
    color: #b0b0b0;
    font-size: 13px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-send-email {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #008ACF 0%, #00a3e8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 138, 207, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-send-email:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 138, 207, 0.4);
    background: linear-gradient(135deg, #0079b3 0%, #008ACF 100%);
}

.btn-send-email:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Loading Animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    display: none;
    padding: 15px;
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.success-message.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE - TABLETS (1024px y menos)
   ============================================================ */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .welcome-section {
        padding: 50px 30px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 138, 207, 0.2);
    }

    .welcome-section h1 {
        font-size: 40px;
    }

    .login-section {
        padding: 50px 30px;
    }

    .erp-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RESPONSIVE - MÓVIL GRANDE (768px y menos)
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        border-radius: 15px;
        flex-direction: column;
    }

    .welcome-section {
        padding: 30px 20px;
        text-align: center;
        border-right: none;
        border-bottom: 1px solid rgba(0, 138, 207, 0.2);
        min-height: auto;
    }

    .welcome-section img {
        width: 120px;
        margin-bottom: 20px;
    }

    .welcome-section h1 {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .welcome-section .subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .welcome-section p {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .erp-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 15px;
    }

    .feature {
        font-size: 10px;
        padding: 8px;
    }

    .feature-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .login-section {
        padding: 30px 20px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-header h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .login-header p {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .form-group input {
        padding: 10px 12px 10px 40px;
        font-size: 13px;
    }

    .input-icon {
        font-size: 14px;
    }

    .password-toggle {
        font-size: 12px;
    }

    .form-options {
        margin-bottom: 20px;
        gap: 8px;
    }

    .checkbox {
        font-size: 11px;
    }

    .forgot-password {
        font-size: 11px;
    }

    .btn-signin {
        padding: 11px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .btn-social {
        padding: 10px;
        font-size: 11px;
        margin-top: 12px;
    }

    .signup-link {
        font-size: 10px;
        margin-top: 15px;
    }

    .modal-content {
        padding: 25px 20px;
        border-radius: 12px;
        max-width: 90%;
    }

    .modal-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .close-btn {
        font-size: 20px;
    }

    .contact-info {
        margin: 15px 0;
    }

    .contact-item {
        gap: 12px;
        margin-bottom: 12px;
        padding: 10px;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .contact-details h3 {
        font-size: 12px;
    }

    .contact-details p {
        font-size: 11px;
    }

    .modal-description {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .forgot-form-group {
        margin-bottom: 15px;
    }

    .forgot-form-group label {
        font-size: 11px;
    }

    .forgot-form-group input {
        padding: 9px;
        font-size: 12px;
    }

    .btn-send-email {
        padding: 10px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .success-message {
        padding: 12px;
        font-size: 12px;
    }
}

/* ============================================================
   RESPONSIVE - MÓVIL PEQUEÑO (480px y menos)
   ============================================================ */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .background-shape-1,
    .background-shape-2 {
        width: 150px;
        height: 150px;
        opacity: 0.5;
    }

    .container {
        border-radius: 12px;
    }

    .welcome-section {
        display: none;
    }

    .login-section {
        padding: 25px 18px;
        border-radius: 12px;
        width: 100%;
    }

    .login-header {
        margin-bottom: 25px;
        text-align: center;
    }

    .login-header h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .login-header p {
        font-size: 11px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 10px;
        margin-bottom: 5px;
    }

    .form-group input {
        padding: 9px 10px 9px 38px;
        font-size: 12px;
    }

    .input-icon {
        left: 12px;
        font-size: 14px;
    }

    .password-toggle {
        right: 12px;
        font-size: 11px;
    }

    .form-options {
        margin-bottom: 18px;
        gap: 6px;
        font-size: 10px;
    }

    .btn-signin {
        padding: 10px;
        font-size: 11px;
        letter-spacing: 0px;
        margin-bottom: 8px;
    }

    .btn-social {
        padding: 9px;
        font-size: 10px;
        margin-top: 10px;
    }

    .signup-link {
        font-size: 9px;
        margin-top: 12px;
    }

    .modal-content {
        padding: 20px 16px;
        border-radius: 10px;
        max-width: 95%;
    }

    .modal-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .close-btn {
        font-size: 20px;
    }

    .contact-item {
        gap: 10px;
        margin-bottom: 10px;
        padding: 8px;
    }

    .contact-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .contact-details h3 {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .contact-details p {
        font-size: 10px;
    }

    .modal-description {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .forgot-form-group label {
        font-size: 10px;
    }

    .forgot-form-group input {
        padding: 8px;
        font-size: 11px;
    }

    .btn-send-email {
        padding: 9px;
        font-size: 11px;
        letter-spacing: 0px;
    }

    .success-message {
        padding: 10px;
        font-size: 11px;
    }
}