/* ===================================
   Login Enhanced Styles - OpenRest 2025
   =================================== */

/* Variables de colores - Tema Naranja y Negro */
:root {
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #ff5722 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2D3436 0%, #1a1a1a 100%);
    --openrest-primary: #FF6B35;
    --openrest-primary-hover: #ff5722;
    --openrest-dark: #2D3436;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2a2a2a;
    --input-bg: #333333;
    --border-color: #404040;
}

/* Animaciones principales */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes shimmer {
    100% { left: 100%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Animación de entrada para el formulario */
.auth-max-width {
    animation: slideInUp 0.6s ease-out;
}

/* Header mejorado */
.login-header {
    animation: fadeIn 0.8s ease-out;
}

.login-header h2 {
    transition: transform 0.3s ease;
}

.login-header h2:hover {
    transform: scale(1.02);
}

/* Slogan estilizado - Tema Naranja */
.login-header p {
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, #FF6B35, #ff5722, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 3s ease-in-out infinite;
}

@keyframes shimmer-text {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

/* Input groups mejorados */
.input-group {
    position: relative;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.input-group-text {
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.input-group:focus-within .input-group-text {
    background: var(--primary-gradient) !important;
    border-color: #667eea;
}

.form-control {
    border: 2px solid #e0e0e0 !important;
    transition: all 0.3s ease;
    background: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-control:hover {
    border-color: #b0b0b0 !important;
}

.form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 4px 10px rgba(0,0,0,0.1);
    background: white !important;
    transform: translateY(-1px);
}

.form-control.is-valid {
    border-color: #43e97b;
    background-image: none;
}

/* Botones mejorados */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

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

/* Botón de carga */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Teclado virtual mejorado para garzones */
.virtual-keyboard .btn-corporate {
    background: linear-gradient(145deg, #f0f0f0, #cacaca);
    box-shadow: 5px 5px 10px #bebebe, -5px -5px 10px #ffffff;
    border: none;
    transition: all 0.1s ease;
    font-weight: bold;
}

.virtual-keyboard .btn-corporate:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.05);
}

.virtual-keyboard .btn-corporate:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 5px #bebebe, inset -2px -2px 5px #ffffff;
}

.virtual-keyboard .btn-reed {
    background: var(--danger-gradient);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.virtual-keyboard .btn-reed:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.virtual-keyboard .btn-reed:active {
    transform: scale(0.95);
}

/* Display del código PIN */
#f-user {
    font-family: 'Courier New', monospace;
    letter-spacing: 10px;
    font-size: 2rem;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: inset 3px 3px 6px #d1d1d1, inset -3px -3px 6px #ffffff;
}

/* Panel promocional mejorado */
.enterprise-promo {
    background: #f0f6fa;
    position: relative;
    overflow: hidden;
}

.enterprise-promo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: float 10s infinite ease-in-out;
}

.feature-row {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255,255,255,0.5);
}

.feature-row:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-icon-sm {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Sistema de estado */
.system-status {
    animation: slideInUp 0.8s ease-out 0.2s both;
    border-left: 3px solid #43e97b;
}

.status-indicator {
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(67, 233, 123, 0.5);
}

/* Mensaje de bienvenida contextual */
.welcome-message {
    background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideInUp 0.8s ease-out 0.1s both;
}

/* Toggle de tema */
.theme-toggle {
    z-index: 1000;
}

.theme-toggle button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.theme-toggle button:hover {
    transform: rotate(180deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Badge de seguridad mejorado */
.badge.bg-success {
    background: var(--success-gradient) !important;
    animation: pulse 3s infinite;
    box-shadow: 0 2px 10px rgba(67, 233, 123, 0.3);
}


/* Responsive mejoras */
@media (max-width: 768px) {
    .auth-max-width {
        padding: 20px !important;
    }
    
    .virtual-keyboard .btn {
        padding: 15px !important;
    }
    
    .feature-row {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* Efectos de hover para links */
a {
    position: relative;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Animación de entrada para elementos */
[data-aos] {
    transition-property: transform, opacity;
}

/* Efecto de cristal */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B35;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

/* ===================================
   Bootstrap Overrides - Tema Naranja
   =================================== */

/* Botones Primary - Naranja */
.btn-primary,
.bg-primary {
    background-color: #FF6B35 !important;
    background: var(--primary-gradient) !important;
    border-color: #FF6B35 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #ff5722 !important;
    border-color: #ff5722 !important;
}

/* Input groups con tema naranja */
.input-group-text.bg-primary {
    background: linear-gradient(135deg, #FF6B35, #ff5722) !important;
    border-color: #FF6B35 !important;
}

/* Status indicators */
.status-indicator.bg-primary {
    background-color: #FF6B35 !important;
}

/* Links y textos primary */
.text-primary {
    color: #FF6B35 !important;
}

a.text-primary:hover {
    color: #ff5722 !important;
}

/* Modal headers */
.modal-header.bg-primary {
    background: linear-gradient(135deg, #FF6B35, #ff5722) !important;
}

/* Display mask */
.display-mask.bg-primary {
    background: linear-gradient(135deg, #FF6B35, #ff5722) !important;
}

/* Toggle password hover */
#togglePassword:hover {
    color: #FF6B35 !important;
}