/* 
 * Login Empresarial - login.css 
 * Diseño profesional para página de acceso de Gemelo Landes
 */

/* Variables CSS empresariales */
:root {
    /* Colores corporativos principales */
    --primary-blue: #1e40af;
    --primary-blue-light: #3b82f6;
    --primary-blue-dark: #1e3a8a;
    --primary-blue-50: #eff6ff;
    --primary-blue-100: #dbeafe;
    --primary-blue-600: #2563eb;
    --primary-blue-700: #1d4ed8;
    --primary-blue-800: #1e40af;
    --primary-blue-900: #1e3a8a;
    
    /* Grises empresariales */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Estados empresariales */
    --success: #059669;
    --success-light: #10b981;
    --success-50: #ecfdf5;
    --warning: #d97706;
    --warning-light: #f59e0b;
    --warning-50: #fffbeb;
    --danger: #dc2626;
    --danger-light: #ef4444;
    --danger-50: #fef2f2;
    
    /* Sombras profesionales */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transiciones empresariales */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease-in-out;
    --transition-slow: 0.35s ease-in-out;
    
    /* Tipografía empresarial */
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Reset y configuración base */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-enterprise-container {
    font-family: var(--font-body);
    /* background: var(--gray-50); */
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
}

/* Panel izquierdo - Información corporativa */
.login-info-panel {
    background: linear-gradient(135deg, var(--primary-blue-800) 0%, var(--primary-blue-900) 50%, var(--primary-blue-800) 100%);
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.login-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 180, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(120, 180, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% {
        opacity: 0.7;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(10px);
    }
}

.info-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    max-width: 600px;
}

/* Sección de branding */
.brand-section {
    text-align: center;
    margin-bottom: 2rem;
}

.company-logo {
    animation: fadeInUp 1s ease-out;
}

.company-logo i {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Sección de características */
.features-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInLeft 1s ease-out 0.3s both;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
    padding-right: 1rem;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.feature-text h4 {
    margin: 0 0 0.25rem 0;
    font-family: var(--font-heading);
}

.feature-text p {
    margin: 0;
    line-height: 1.5;
}

/* Footer informativo */
.info-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Panel derecho - Formulario */
.login-form-panel {
    background: white;
    position: relative;
}

.login-card {
    animation: fadeInRight 1s ease-out 0.2s both;
}

/* Header del formulario */
.login-header {
    animation: fadeInDown 1s ease-out 0.4s both;
}

.mobile-logo {
    animation: fadeInDown 1s ease-out;
}

/* Estilos del formulario */
.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
    background: white;
    transition: all var(--transition-normal);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 1rem;
    transition: color var(--transition-fast);
    pointer-events: none;
}

.form-input:focus + .input-icon {
    color: var(--primary-blue);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

/* Errores de campo */
.field-error {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--danger-50);
    border: 1px solid var(--danger);
    border-radius: 6px;
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Opciones del formulario */
.form-options {
    margin: 1.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.checkbox-custom::after {
    content: '';
    width: 0.5rem;
    height: 0.75rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* Botón de login */
.login-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.login-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.login-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-content,
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.btn-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Botón secundario */
.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Información de seguridad */
.security-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Footer del formulario */
.login-footer {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.footer-link {
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-blue);
}

/* Alertas */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInDown 0.4s ease-out;
}

.alert-error {
    background: var(--danger-50);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: var(--success-50);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-50);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* Modal empresarial */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-2xl);
    max-width: 24rem;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-2rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    font-family: var(--font-heading);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

/* Sistema de notificaciones toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 24rem;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: toastSlideIn 0.4s ease-out;
    transition: all var(--transition-normal);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--primary-blue);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.slide-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

.toast-icon {
    color: inherit;
    font-size: 1.125rem;
    margin-top: 0.125rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

.toast-message {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.toast-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estados de carga */
.loading-state {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive design empresarial */
@media (max-width: 1024px) {
    .info-overlay {
        padding: 2rem;
    }
    
    .features-section h3 {
        font-size: 1.5rem;
    }
    
    .feature-item {
        padding: 0.75rem 0;
    }
}

@media (max-width: 768px) {
    .login-enterprise-container {
        flex-direction: column;
    }
    
    .login-form-panel {
        padding: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    
    .toast {
        margin: 0;
    }
}

@media (max-width: 640px) {
    .login-form-panel {
        padding: 1rem;
    }
    
    .form-input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
    }
    
    .login-btn-primary {
        padding: 0.875rem 1rem;
    }
    
    .info-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Estados de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para navegación con teclado */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Estados de impresión */
@media print {
    .login-info-panel,
    .mobile-logo,
    .login-footer {
        display: none !important;
    }
    
    .login-enterprise-container {
        background: white !important;
    }
    
    .login-card {
        box-shadow: none !important;
    }
}

/* Estados de alto contraste */
@media (prefers-contrast: high) {
    :root {
        --gray-300: #999;
        --gray-400: #777;
        --gray-500: #555;
    }
}