/* ==========================================
   TOPBAR SUPERIOR - Estilo Purple Admin
   ========================================== */
.topbar {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.topbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 65px;
}

/* ==========================================
   LOGO / BRAND
   ========================================== */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topbar-brand:hover {
    color: #a855f7;
}

.topbar-brand i {
    font-size: 2rem;
    color: var(--color-primary);
}

.topbar-brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* ==========================================
   BÚSQUEDA
   ========================================== */
.topbar-search {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 24px;
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.topbar-search:focus-within {
    background: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topbar-search i {
    color: #6b7280;
    font-size: 0.875rem;
    margin-right: 0.75rem;
}

.topbar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1f2937;
    font-size: 0.875rem;
    padding: 10px 0;
}

.topbar-search input::placeholder {
    color: #9ca3af;
}

/* Estado activo de búsqueda (cuando hay 3+ caracteres) */
.topbar-search.searching {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.topbar-search.searching i {
    color: #3b82f6;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   ACCIONES DE LA DERECHA
   ========================================== */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.topbar-icon:hover {
    background: #f3f4f6;
    color: var(--color-primary);
}

.topbar-icon .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ==========================================
   USUARIO
   ========================================== */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 12px 4px 4px;
    background: #f3f4f6;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topbar-user:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15);
}

.topbar-user:active {
    transform: translateY(0);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}

.topbar-user i {
    color: #6b7280;
    font-size: 10px;
}

.topbar-user .user-name {
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Botón Hamburguesa - DESHABILITADO (no se usa) */
.navbar-hamburger {
    display: none !important;
}
