/**
 * Estilos personalizados para el sistema de usuarios - RASTRAR
 * Archivo: css/users-styles.css
 */

/* ============================================
   BOTONES DE MODO DE VISTA
   ============================================ */
.view-mode-btn-users {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.8rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-mode-btn-users:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.view-mode-btn-users.active {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-color: #FF6B35;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.view-mode-btn-users:active {
    transform: translateY(0);
}

/* ============================================
   TARJETAS DE USUARIO COMPACTAS
   ============================================ */
.user-card-compact {
    transition: all 0.3s ease;
}

.user-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
}

/* ============================================
   BOTONES DE ACCIÓN COMPACTOS
   ============================================ */
.btn-action-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-action-compact:hover {
    transform: scale(1.1);
}

.btn-action-compact:active {
    transform: scale(0.95);
}

/* ============================================
   BOTÓN DE COPIAR PEQUEÑO
   ============================================ */
.btn-copy-small {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #FF6B35;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-small:hover {
    background: rgba(255, 107, 53, 0.3);
    transform: scale(1.05);
}

.btn-copy-small:active {
    transform: scale(0.95);
}

/* ============================================
   INPUTS Y SELECTS EN MODALES
   ============================================ */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FF6B35;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input option {
    background: #1a1a2e;
    color: white;
    padding: 8px;
}

/* ============================================
   FILTROS Y BÚSQUEDA
   ============================================ */
#regionFilterSelect,
#searchInputUsers {
    transition: all 0.3s ease;
}

#regionFilterSelect:focus,
#searchInputUsers:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

#regionFilterSelect option {
    background: #1a1a2e;
    color: white;
    padding: 10px;
}

/* ============================================
   SCROLL PERSONALIZADO
   ============================================ */
.scroll-container::-webkit-scrollbar {
    width: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.7);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   GLASS CARD EFECTO
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   BADGES Y ETIQUETAS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.badge-primary {
    background: rgba(255, 107, 53, 0.2);
    color: #FF6B35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ============================================
   BOTONES PRINCIPALES
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: #9CA3AF;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.3);
    color: white;
}

/* ============================================
   TOOLTIPS
   ============================================ */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .user-card-compact {
        width: 100%;
    }
    
    .view-mode-btn-users {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 640px) {
    .glass-card {
        padding: 1rem;
    }
    
    .form-input {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
}

/* ============================================
   ESTADOS DE CARGA
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FF6B35;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   CÓDIGO Y MONOSPACE
   ============================================ */
code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    letter-spacing: 0.5px;
}

/* ============================================
   ICONOS DE ESTADO
   ============================================ */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
}

.status-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.status-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.status-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.status-icon.info {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

.gradient-text {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}